Results 1 to 7 of 7

Thread: HTTPS request returns damaged HTML body

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: HTTPS request returns damaged HTML body

    Well, then I have another one

    You will need to delete the reply object, otherwise you are leaking it.
    One way to do that is to schedule its deletion in the slot connected to the finished signals

    Qt Code:
    1. void MainWindow::resp(QNetworkReply *reply)
    2. {
    3. QString responseData = QString::fromAscii(reply->readAll());
    4. ui->edResponse->setText( ui->edResponse->toPlainText() + "\r\n" + responseData);
    5.  
    6. reply->deleteLater(); // schedule deletion when event loop continues event processing
    7. }
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    ljuhrich (5th June 2013)

Similar Threads

  1. Replies: 1
    Last Post: 5th December 2012, 09:19
  2. Replies: 0
    Last Post: 22nd October 2012, 12:39
  3. Replies: 0
    Last Post: 3rd May 2011, 09:15
  4. any body using qextserialport?
    By yagabey in forum Newbie
    Replies: 4
    Last Post: 25th December 2007, 22:08
  5. Https POST Request
    By munna in forum Qt Programming
    Replies: 10
    Last Post: 11th November 2006, 14:24

Tags for this Thread

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.