Results 1 to 2 of 2

Thread: QHttp internal error

  1. #1
    Join Date
    Aug 2006
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QHttp internal error

    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?

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QHttp internal error

    Try reporting it at Trolltech's task tracker http://www.trolltech.com/developer/task-tracker and you will get their opinion of it. Personally, I think that internal errors should be avoided.

Similar Threads

  1. Problems
    By euthymos in forum Installation and Deployment
    Replies: 2
    Last Post: 13th June 2006, 19:11
  2. Fed up with M$ Window$ !!! Why is Tux leaving me alone???
    By fullmetalcoder in forum General Discussion
    Replies: 35
    Last Post: 18th March 2006, 12:57
  3. ERROR:: QPainter: Internal error; no available GC
    By Krishnacins in forum Qt Programming
    Replies: 2
    Last Post: 8th March 2006, 06:05
  4. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 12:54
  5. qmake_image_collection.cpp gives me a compiling error
    By vfernandez in forum Qt Programming
    Replies: 2
    Last Post: 31st January 2006, 01:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.