Results 1 to 9 of 9

Thread: HELP NEEDED: HHTPS POST to Apache server fails

  1. #1
    Join Date
    Mar 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default HELP NEEDED: HHTPS POST to Apache server fails

    I'm attemptinng to POST a data file to an Apache HTTPS server running locally on my PC, but it fails with QNetworkReply::UnknownNetworkError every time....
    No activity is logged in the Apache server log files.
    Even if I'm using the wrong certificate file, shouldn't I expect to see something in the Apached log files?

    I'm using the QNetworkAccessManager:: post() method, and have hooked on to the SIGNALS: finished, authenticationRequired, proxyAuthenticationRequired, sslErrors, networkAccessibleChanged.
    Only the finished slot is invoked, with the QNetworkReply object containing error 99...

    Where should I start looking for the error of my ways?
    HEEELLP! Any hints and tips will be greatly appreciated )

    The Apache server is Apache 2.2.21 with mod_ssl/2.2.21, OpenSSL 0.9.8r.

  2. #2
    Join Date
    Aug 2011
    Posts
    44
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows Symbian S60

    Default Re: HELP NEEDED: HHTPS POST to Apache server fails

    Do you use Qt from QtSDK? Or you built Qt by your self?

  3. #3
    Join Date
    Mar 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: HELP NEEDED: HHTPS POST to Apache server fails

    I use "off the shelf" Qt 4.7.0 with Visual Studio 2008 (not static build). Straight up, no ice.

  4. #4
    Join Date
    Aug 2011
    Posts
    44
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows Symbian S60

    Default Re: HELP NEEDED: HHTPS POST to Apache server fails

    To issue HTTPS requests you need (a) Qt compiled with OpenSSL support and (b) OpenSLL DLL's.
    I guess you have them all. Correct?

  5. #5
    Join Date
    Mar 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: HELP NEEDED: HHTPS POST to Apache server fails

    No, as far as I have understood, no special build of Qt is required as long as the required DLL's are present in the applications' PATH at run time. If they are not, a call to QSslSocket::supportsSsl () will return FALSE. I use this method to verify that the PC supports SSL.

    So (a) No, (b) Yes

  6. #6
    Join Date
    Aug 2011
    Posts
    44
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows Symbian S60

    Default Re: HELP NEEDED: HHTPS POST to Apache server fails

    I guess you're not quite right about SSL support.
    IIRC Qt might be complied with or without OpenSSL support (and there might be two kinds of OpenSSL support(dynamic and static)).

    Anyway I would suggest you to check whether your app loads OpenSSL dll's on runtime or not.

  7. #7
    Join Date
    Mar 2011
    Posts
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: HELP NEEDED: HHTPS POST to Apache server fails

    Thank's for the tip, llev, but alas, all my DLLs are being loaded at run time (ssleay32.dll, libeay32.dll, zlib1.dll)....

  8. #8
    Join Date
    Aug 2011
    Posts
    44
    Thanked 13 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows Symbian S60

    Default Re: HELP NEEDED: HHTPS POST to Apache server fails

    That's good.
    Could you use some sniffer to log your app network traffic to determine whether it tries to issue such HHTPS request?
    Last edited by llev; 26th September 2011 at 17:36.

  9. #9
    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: HELP NEEDED: HHTPS POST to Apache server fails

    Please check whether any data leaves your computer when you issue the request.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 3
    Last Post: 20th November 2014, 18:12
  2. Replies: 0
    Last Post: 28th February 2011, 10:10
  3. How to upload file to HTTP server (POST Method)
    By Alex Snet in forum Qt Programming
    Replies: 8
    Last Post: 24th January 2011, 23:49
  4. QT HTTP Post issue when server requires cookies
    By shadyabhi in forum Qt Programming
    Replies: 0
    Last Post: 22nd December 2010, 14:10
  5. QCursor::setPos() fails with x server fatal error
    By Arnaldo Diniz in forum Qt Programming
    Replies: 3
    Last Post: 3rd December 2010, 00:45

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.