Results 1 to 2 of 2

Thread: From QHttp to QHttp over SSL

  1. #1
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default From QHttp to QHttp over SSL

    Hello,

    I was using the QHttp class under Qt4.2.3 to fill an anthentification form, get the response and the cookie value from the server (If well authentificated), and then to download a private page content.

    The problem is that the page should be stored on a securised zone.
    With Qt 4.3 - open source for Windows - we have a SSL support (QHttp with a QHttp::ConnectionModeHttps parameter, and sslSockets that use the openSSL library). So we have transfered our small web site under our securised area, and we woul like to access it like before...

    Using QHttp connection, with the SSL mode activated and handling sslErrors, is causing me some troubles.

    With Qhttp from Qt4.2.3 :
    Qt Code:
    1. http = new QHttp(post_request_host, post_request_port);
    To copy to clipboard, switch view to plain text mode 

    With Qhttp over SSL from Qt3 :
    Qt Code:
    1. http = new QHttp(post_request_host, QHttp::ConnectionModeHttps, post_request_port);
    To copy to clipboard, switch view to plain text mode 

    For each web page of our HTTPs area I try to download (using GET header) or to fill (using a POST header), the server answers me with a 302 redirection error code. The most funny is that some of thoses pages didn't contain any "referer" tag, and in most cases the redirectons information says me that the new place of the page is... the one I called.

    I've tested with a copy of our old HTTP web site : I pasted it in the HTTPs area, and I can't used it simply indicating the QHttp::ConnectionModeHttps parameter. Is there something else to do ?

    Should I compile Qt with the link to the openSSL library ?
    I think that this library is used for the new sslSockets, derived from QTcpSockets, but I didn't find any reference to the QHttp class.

    Thanks for your comments, ideas or suggestions

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: From QHttp to QHttp over SSL

    Did you remember to connect to the proper port?

Similar Threads

  1. new QHttp() Error
    By fengtian.we in forum Qt Programming
    Replies: 7
    Last Post: 6th October 2010, 17:56
  2. QHttp download file problem.
    By fengtian.we in forum Qt Programming
    Replies: 12
    Last Post: 12th June 2007, 09:39
  3. Setting a cookie for a Qhttp connection
    By Nyphel in forum Newbie
    Replies: 16
    Last Post: 5th April 2007, 15:30
  4. QHttp (internal bug?)
    By fear in forum Qt Programming
    Replies: 12
    Last Post: 16th March 2007, 07:18
  5. how to use QHttp inside QThread in Qt3
    By alusuel in forum Qt Programming
    Replies: 3
    Last Post: 14th July 2006, 11:19

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.