I'm trying to call a WebService hosted into a WebLogic server. Everytime I call it with a empty value into the "host" header, I receive a "400 - Bad Request" response. If I put something into the host header, the request is ok and I can consume the WS. The RFC says:
A client MUST include a Host header field in all HTTP/1.1 request messages . If the requested URI does not include an Internet host name for the service being requested, then the Host header field MUST be given with an empty value
When I send the host with empty value, I'm sending the URI without the host name, so, by the RFC, I'm doing ok.
This is my HTTP header that's receiving a Bad Request:
POST /myContent/myWebService HTTP/1.1
SOAPAction: mySOAPcall
Connection: Keep-Alive
Host:
Content-Type: text/xml;charset=UTF-8
Content-Length: 709
If I put the host, it works fine:
POST http://mydomain.com.br/myContent/myWebService HTTP/1.1
SOAPAction: mySOAPcall
Connection: Keep-Alive
Host: mydomain.com.br
Content-Type: text/xml;charset=UTF-8
Content-Length: 709
Am I missing something into the request with the empty host header?