Test to recreate Issue #1

The interesting thing is that if I remove the sleep it works perfectly
fine. I wonder if the iOS client is somehow interupting it's network
interface or something that would cause a delay in the socket sending
code.
Fix Issue #1

md5sum a.out
87772246af227227b039d4a01886da6f  a.out

Fixed parsing and socket reading logic to handle slow connections. Fixed
counting of recieved content length to work correctly everytime.

Removed logic from when response logic wasn't dynamically allocated.