What is the proper way to handle a fully qualified domain in a GET request?
Posted
by
Mark P Neyer
on Stack Overflow
See other posts from Stack Overflow
or by Mark P Neyer
Published on 2011-02-11T21:21:42Z
Indexed on
2011/02/11
23:25 UTC
Read the original article
Hit count: 190
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!
© Stack Overflow or respective owner