Hi Ivan, On Sat, Jun 5, 2010 at 12:51 AM, Ivan Johannessen <[email protected]> wrote: > Hi Dean, > I've just downloaded library and built the http_client.cpp sample.
What version did you download? > Testing > it out by giving it the URL: http://www.google.com results in a "Missing > Transfer Encoding" exception. Looking the code in sync_connection_base.hpp I > see that either a Content-Length or Transfer-Encoding header is required. > However, the response fromwww.google.com does not contain a message body(I > assume because the Connection:close header was included in the request), > thus the presence of either of those headers are optional. Thoughts? Actually I would say it's because the client in the HTTP example doesn't follow directs automatically (IIRC). I need to check this. The 0.6.1 version has an HTTP client that is HTTP/1.1 compliant and thus should support already HTTP/1.0 responses from servers. In the HTTP/1.1 spec, the server's HTTP/1.1 response *should* contain either a Transfer-Encoding header, or a Content-Length header. In the case of the example, I don't think it adds the "follow_redirects" constructor option. I'll dig into it later but can you check whether the response is an HTTP 200 or an HTTP 302? Thanks and I hope this helps! -- Dean Michael Berris deanberris.com ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Cpp-netlib-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel
