Added HTTP dechunking.
Missing support for HTTPS connections (through curl or similar) and max redirections / max retries. Fix this!