The topic is a bit strange, let me express myself.
I used this method to generate post requests:
http://www.jonasjohn.de/snippets/php/post-request.htm
thats ok, but after a size, I realized the datas gets changes a little, there are unwanted white spaces. Only in case of a bigger size, + a “chunked” flag appeared.
I change the Http/1.1 protocol to Http/1.0 and now the transfers look good!
But is there any backward, pitfalls?
Well there are a number of important differences between http 1.0 and 1.1 of course, look at this article for an overview.
One that I can directly spot as affecting your code is
The Host header field doesn’t exist in http 1.0, and that could affect your ability to post to servers that host multiple domains and/or subdomains via name based virtual hosting – the server won’t know what domain you’re calling.
As a general note, writing a post request this way is a nice exercise and it’s always good to know what goes on under the hood, but for production purposes I’d use a full-blown, well tested mechanism like cURL
And for reference: