hrydgard/native — pull request #89 by unknownbrackets (2013-06-25 02:49:45+00:00)
Title: Support non-chunked HTTP responses

It's possible we might issue a GET or POST and it may be intercepted by a proxy, for example. Anyway, unless we want to support trailers or etc., we'll want non-chunked to have Content-Length / progress work correctly.

I wrote this quick, and have not tested it a ton (a bit short on time), but I did make sure it can download both a chunked response (e.g. the current json file) and a non-chunked response (e.g. Google's logo.) That said, I've written HTTP servers and clients in several different languages so hopefully I got it right.

I tried to remove any possible areas of overflow/CHECK/FLOG since failing is a lot better than intentionally crashing.

-[Unknown]