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.
精彩评论