Hi

I am trying to communicate to an AXIS product and it sends me serial data over HTTP. The sequence is:

Qt Code:
  1. HTTP GET ->
  2. <- HTTP 204 - No Content
  3. <- HTTP Continuation or non-Http traffic
  4. <- HTTP Continuation or non-Http traffic
  5. <- HTTP Continuation or non-Http traffic
  6. etc
To copy to clipboard, switch view to plain text mode 

I have traced through the QT code to the function QHttpPrivate::_q_slotReadyRead(). It appears that QT thinks it must find a valid header in the " HTTP Continuation or non-Http traffic" packets. Since the code can't find the header, it returns and does not extract the data.

Qt Code:
  1. void QHttpPrivate::_q_slotReadyRead()
  2. {
  3. Q_Q(QHttp);
  4. QHttp::State oldState = state;
  5. if (state != QHttp::Reading) {
  6. setState(QHttp::Reading);
  7. readHeader = true;
  8. headerStr = QLatin1String("");
  9. bytesDone = 0;
  10. chunkedSize = -1;
  11. repost = false;
  12. }
  13.  
  14. while (readHeader) {
  15. bool end = false;
  16. QString tmp;
  17. while (!end && socket->canReadLine()) {
  18. tmp = QString::fromAscii(socket->readLine());
  19. if (tmp == QLatin1String("\r\n") || tmp == QLatin1String("\n") || tmp.isEmpty())
  20. end = true;
  21. else
  22. headerStr += tmp;
  23. }
  24.  
  25. if (!end)
  26. return; //****This is where it returns, ARG*********
To copy to clipboard, switch view to plain text mode 

These packet types are apparently common (see http://ayis.javaeye.com/blog/351217), so why would QT drop them? Is there a bug in QT?

Any help would be greatly appreciated!