On Fri, Aug 19, 2011 at 7:14 AM, Leonid Evdokimov <l...@darkk.net.ru> wrote: > Hello, > > Here is patch to add "host" header to outgoing HTTP/1.1 requests. > Please, review. > > Without the patch libevent-based evhttp-client.c can't get reply from > any sane server because the request is rejected with "400 Bad request" > and workaround - adding the header manually - is required. >
Looks to me as if this should be using the REQ_VERSION_ATLEAST macro. Other than that, it looks okay. It'd need some tweaking for https support, I think, where 443 is the default. Perhaps the port should be included unconditionally, if that doesn't break anything: the rfc says that we _can_ omit port 80, not that we must. -- Nick *********************************************************************** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-users in the body.