2

I have a domain name that is using a public IP, when I send two requests, one to the domain name and one to the IP I get different headers in each one, in one of them 4 cookies are set, in the other one only 2 are set. Using nslookup and some online tools, I can see the domain name is linked with the ip, so I'm finally testing the same thing (IP and domain name) but getting different responses. The public IP is translated into one private inside my LAN, the firewall that is making this does not insert anything. This is really weird.

What can be wrong?

  • You should put your request and answer to see what is different – Orlando Gaetano Feb 9 '16 at 14:50
  • Questions about protocols above OSI lauer-4 are explicitly off-topic. – Ron Maupin Feb 9 '16 at 18:24
1

I have a domain name that is using a public IP, when I send two requests, one to the domain name and one to the IP I get different headers in each one, in one of them 4 cookies are set, in the other one only 2 are set.

(...)

What can be wrong?

Make sure your HTTP client is sending the same request for both cases.

Request line format: Method SP Request-URI SP HTTP-Version CRLF

Exemple for request line: GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1

In example above, Request-URI is http://www.w3.org/pub/WWW/TheProject.html

If your client puts an IP addresses in the place of the hostname www.w3.org, the web server might issue a different result.

See also: https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.