I think we crossed paths in our conversation here. There are two things: 1. What the command line should look. You are saying one should use --resolve 'foo.com:80:virtual.com" (or maybe the address for virtual.com though it seems that if you have to fetch the IP address yourself, people will still use a Host header) rather than -H 'Host: virtual.com' http://foo.com. I have no reason to disagree.
2.Where to get the resulting host information from so I can use it for HTTP MAC. I only care about 2 as far as my code goes, though I enjoy learning proper curl invocations (the 1 part). YA Learn about GPT services and architectures on Confluence. <http://confluence/display/GPT/GPT+Architecture> On 1/18/13 1:05 PM, "Daniel Stenberg" <[email protected]> wrote: >On Fri, 18 Jan 2013, Yves Arrouye wrote: > >> I don't think that --resolve is the right thing here. The reason the >> Internet-Draft asks for the Host header is simply to support virtualized >> hosts. > >Of course. That's the whole purpose of Host: for everyone and that's why >--resolve can help you. You can decide what name to use for which IP >adress >without playing tricks with /etc/hosts or similar. > >> So I truly believe that Host *exactly as sent by curl* is the right >>thing to >> get to generate that HTTP MAC. > >If you use --resolve, you'd use the "right" host name in the URL and thus >the >"right" name will be sent in the Host: header and then everything will be >fine! > >-- > > / daniel.haxx.se >------------------------------------------------------------------- >List admin: http://cool.haxx.se/list/listinfo/curl-library >Etiquette: http://curl.haxx.se/mail/etiquette.html ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
