I just fought with a problem that finally appeared to be caused by the HTTP 1.1 version and the transfer-encoding in it. Every 1.1 client must be capable of receiving "chunked data" which is marked by header "Transfer-Encoding: chunked".
I rewrote part of the httprequest method and now it seems to work. I also rewrote part of the 1.0 code to make it more reliable. It is ugly but it works now. What should I do with my changes?