Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.4.0
-
None
Description
I cannot use the QNAM and QHttpMultiPart to upload files.
Attached will be two projects, a tcpServer project where you just run it and it will listen on port 1338, and a client program testHttpMultiPart. testHttpMultiPart takes files from the command line (i.e. testHttpMultiPart file1.jpg file2.jpg) and sends them to the tcpServer. tcpServer then prints the raw HTTP request out in the format: Q_FUNC_INFO << byteCount << "data"
The client program never finishes until QNAM/QNetworkReply times out. My average size is 2 files each ~100k of binary data. It never completes sending the first file, it deadlocks somehow and times out, at which point it exits. In theory two 100k files on local loopback should take a fraction of a second.
Please confirm or deny this. I'm using Mint 16 (Ubuntu 13.10) I can't imagine that matters though.
Here is as far as I get (the two files in this example are 56k each):
void TcpServer::handleConnection() Connection from "127.0.0.1" void TcpServer::read() 315 "POST /debug/visit/files HTTP/1.1 Content-Type: multipart/form-data; boundary="boundary_.oOo._ODYwMDk5Njc1MTk3NDMwNTQ4OQ==MTA4NTY3MDM4Ng==" MIME-Version: 1.0 Content-Length: 114083 Connection: Keep-Alive Accept-Encoding: gzip, deflate Accept-Language: en-US,* User-Agent: Mozilla/5.0 Host: localhost:1338 " void TcpServer::read() 16384 "--boundary_.oOo._ODYwMDk5Njc1MTk3NDMwNTQ4OQ==MTA4NTY3MDM4Ng== Content-Type: image/jpeg Content-Disposition: form-data; name="file0"; filename="e880e954-665d-4a89-bba1-4786295533fa.jpg" void TcpServer::read() 97699 ") ��;{RVn��ɑ��ێi�4� �pM�$�Dt�9���rj��GP��8�D!�U�0)W��)Y���'9�O#!z�� \��TU��ڽ��2������P����e���i�<�Ƭl#�7i&��C*r�!1�usR��4@�4��M��Ҙ��*�<sM�2sU�w�\�NQOc�!��$������(�M� ��iTS�`f��I�����r��J�*/�W�j�w4��jj���l��