Jachk E Jachk E - 1 year ago 151
HTTP Question

I can't return get 200 response from curl command

I have a web application running in my tomcat server. When type the url in the browser, the app is working fine :

enter image description here

But when I do it with the curl command :

curl -IL http://localhost:8090/mysite

I get the following :

HTTP/1.1 405 Method Not Allowed
Server: Apache-Coyote/1.1
Allow: GET
Content-Type: text/html;charset=utf-8
Content-Language: en
Content-Length: 1047
Date: Sun, 20 Nov 2016 11:41:27 GMT

What I am missing ?

Answer Source

Try without "-I" - maybe the server doesn't support HEAD (which would be a severe bug).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download