View Full Version : HELP NEEDED: HHTPS POST to Apache server fails

25th September 2011, 17:08
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 :o)

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

25th September 2011, 19:17
Do you use Qt from QtSDK? Or you built Qt by your self?

26th September 2011, 06:58
I use "off the shelf" Qt 4.7.0 with Visual Studio 2008 (not static build). Straight up, no ice.

26th September 2011, 11:47
To issue HTTPS requests you need (a) Qt compiled with OpenSSL support and (b) OpenSLL DLL's.
I guess you have them all. Correct?

26th September 2011, 11:56
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 :)

26th September 2011, 12:12
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.

26th September 2011, 12:56
Thank's for the tip, llev, but alas, all my DLLs are being loaded at run time (ssleay32.dll, libeay32.dll, zlib1.dll)....

26th September 2011, 17:30
That's good.
Could you use some sniffer to log your app network traffic to determine whether it tries to issue such HHTPS request?

26th September 2011, 22:08
Please check whether any data leaves your computer when you issue the request.