Hello,

I need to post several HTTP requests to some broken server. The server is unable to process more than 1 request in 1 connection, it simply won't respond.
Terminating the connection seems to be the best solution:

Qt Code:
  1.  
  2. header.setRequest("POST", url.path(), 1, 0); // way #1 - force HTTP/1.0
  3. header.addValue("Connection", "close"); // way #2 - force connection close
  4. // some other code
  5. m_http.request(...);
To copy to clipboard, switch view to plain text mode 

The server really does terminate connection when using HTTP/1.0 or Connection: close, but QT doesn't like it. After sending first request (and receiving response) I can't send any more using the same QHttp object.

My request never gets processed and I get this error in the console output:

Qt Code:
  1. QSocketNotifier: Invalid socket specified
  2. QSocketNotifier: Internal error
To copy to clipboard, switch view to plain text mode 

Fortunately, I am able to workaround this problem just by setting new socket before every request:
Qt Code:
  1. m_http.setSocket(new QTcpSocket);
To copy to clipboard, switch view to plain text mode 
...but I still think that this isn't right - QT shouldn't generate Internal errors. Am I right and this should be fixed?