Results 1 to 3 of 3

Thread: QNetworkReply long request - 399 code or incomplete data

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2011
    Posts
    132
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QNetworkReply long request - 399 code or incomplete data

    Hi

    I am experiencing a problem of long request with code 399. It is something randomly but occurs in 90% of requests. The data is XML which I need to parse.

    If no 399 code I get part of my xml respond. The xml is incomplete.

    Thoughts ??

    This is how I make a connections and check for errors, I use all signals to make sure is all good.

    Qt Code:
    1. connect(_reply,SIGNAL(finished()),this, SLOT(postFinished()));
    2. connect(_reply,SIGNAL(readyRead()),this, SLOT(readyReadData()));
    3. connect(_reply,SIGNAL(error(QNetworkReply::NetworkError)),this, SLOT(postError(QNetworkReply::NetworkError)));
    4. connect(_reply,SIGNAL(sslErrors ( const QList<QSslError> & )),this, SLOT(postSslErrors( const QList<QSslError> &)));
    To copy to clipboard, switch view to plain text mode 

    The data a get from readyReadData() so I should have it all there if no error and requests is finished , right ?

    Qt Code:
    1. void FormPost::readyReadData() {
    2. INFO_DEBUGME("http data are ready");
    3.  
    4. data = _reply->readAll();
    5.  
    6. INFO_DEBUGME(data);
    7.  
    8. if(_loop.isRunning())
    9. _loop.exit();
    10. }
    To copy to clipboard, switch view to plain text mode 
    The xml is fine too, all browser can parse it correctly. Also if the xml data is less, then I get full xml and no error.


    I have tried to read a data from QNetworkReply::finished () same thing, incomplete xml data even if QT says
    After this signal is emitted, there will be no more updates to the reply's data or metadata.
    Any ideas ??
    Last edited by migel; 10th August 2011 at 12:31.

Similar Threads

  1. QNetworkReply: how to know when data is sent?
    By mentalmushroom in forum Qt Programming
    Replies: 17
    Last Post: 24th June 2011, 08:22
  2. X Error: BadRequest (invalid request code or no such operation) 1
    By Luc4 in forum Qt for Embedded and Mobile
    Replies: 5
    Last Post: 18th April 2011, 14:40
  3. Replies: 1
    Last Post: 8th March 2011, 06:27
  4. Code Review Request for first small application
    By RurouniJones in forum Newbie
    Replies: 0
    Last Post: 22nd March 2010, 08:22
  5. How do I send data with http post request?
    By Morea in forum Qt Programming
    Replies: 13
    Last Post: 21st January 2009, 22:51

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
  •  
Qt is a trademark of The Qt Company.