[Interest] QNetworkRequest/Reply and HTTP chunked transfer POST

Justin Karneges justin at affinix.com
Tue Sep 25 00:20:48 CEST 2012


Today I noticed that QNetworkRequest/Reply insists on supplying a Content-
Length header in the request sent to the server. This has the drawback that it 
is not possible to submit a POST/PUT body of indeterminate length. If a 
sequential QIODevice is used as the request body input and Content-Length is 
not provided by the app, then Qt will attempt to read the entire QIODevice 
before starting the transmission, in order for it to learn the length so it 
can include a Content-Length header.

Are there any plans to include support for POST/PUT of indeterminate length? I 
believe for requests this is only possible with chunked transfer encoding, 
since the client would have no other way to tell the server where the request 
body ends.


More information about the Interest mailing list