I’m writing a proxy server. When I use curl to fetch a page, say http://www.foo.com/pants, curl makes the following request:
GET /pants HTTP/1.1
When I have curl send that request through my local proxy, curl changes the GET request to:
GET http://www.foo.com/pants HTTP/1.1
This change causes the foo.com server return a 404. Is foo.com broken? Or is the fully qualified domain name only meaningful to proxy servers? Should I always strip http://domain from the requests I send out?
Thanks!
Quoting from rfc 2616, section 5.1.2 “Request-URI”, emphasis by me: