开发者

netcat does not work on glassfish

Maybe a simple explanation for this but it seems that glassfish (on port 8080) does not respond normally to netcat requests ...

for example:

nc localhost 8080
OPTIONS

... nothing is 'returned' and netcat exits. If you do a similar thing against www.google.com 80 you will get an expected error message retu开发者_Python百科rned from the server.

Is glassfish setup to ignore netcat requests or something?

Reason for this is I'm trying to probe the server and find out which HTTP methods it is accepting ... even a GET however doesn't work from netcat which confuses me as I'm able to actually goto localhost:8080 in my browser and use the webpage as expected :(

Thanks for any insights


Your request is malformed, you need to specify the request properly:

OPTIONS * HTTP/1.1

When "HTTP/1.1" is omitted, a few servers still substitute "HTTP/0.9" there, and therefore OPTIONS won't work or just simply ignore a malformed request. Google might be forgiving on malformed requests and substitute proper data in place of the missing parameters.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜