Thursday, November 20th 2008, 4:00pm UTC

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, January 4th 2008, 11:30am

How code for https url requests in Qt?

I am new to Qt. Trying to write an Application accessing a https web site and get some xml data for processing.

I have tried with the example given in the Qt\4.3.3\examples\network\http, but its not working. I don't know how to make it work.

Any Help? Thanks in advance.
  • Go to the top of the page

2

Friday, January 4th 2008, 1:47pm

RE: How code for https url requests in Qt?

perhaps look at
int QHttp::setSocket( QTcpSocket * socket );
and
QSslSocket class
Nicolas
  • Go to the top of the page

3

Sunday, February 10th 2008, 11:40pm

RE: How code for https url requests in Qt?

I have the same problem.
The shit is - trolltech's example network/http doesn'work!
  • Go to the top of the page

4

Monday, February 11th 2008, 12:18am

RE: How code for https url requests in Qt?

I try just now, it works with http

could you give a https site to try?
Nicolas

This post has been edited 1 times, last edit by "Nicolas SOUCHON" (Feb 11th 2008, 12:23am)

  • Go to the top of the page

krsmichael

Beginner

Posts: 50

Location: California

Occupation: Software Engineer

5

Tuesday, February 12th 2008, 4:39am

RE: How code for https url requests in Qt?

You have to acquire and build OpenSSL separately. QHTTP fails quietly if you don't have SSL installed. It works, I've done it.
  • Go to the top of the page

6

Tuesday, February 12th 2008, 8:12am

RE: How code for https url requests in Qt?

after openSsl installed, you probably need to reconfigure and rebuild Qt
Nicolas
  • Go to the top of the page

7

Tuesday, February 12th 2008, 11:17am

RE: How code for https url requests in Qt?

I have Qt 4.3.3(OpenSource) and OpenSSL 0.9.8 installed on WindowsXP.
Qt's configure.exe tells me
OpenSSL support.............no.
Why?
And, as i have written before, Trolltech's QHttp example still doesn't work via https.
  • Go to the top of the page

8

Tuesday, February 12th 2008, 11:26am

RE: How code for https url requests in Qt?

A https site to try is https://sourceforge.net/
  • Go to the top of the page

9

Tuesday, February 12th 2008, 12:32pm

RE: How code for https url requests in Qt?

Quoted

Originally posted by pccrusher
I have Qt 4.3.3(OpenSource) and OpenSSL 0.9.8 installed on WindowsXP.
Qt's configure.exe tells me
OpenSSL support.............no.
Why?
And, as i have written before, Trolltech's QHttp example still doesn't work via https.

if configure says OpenSSL support.............no.
sure ssl sockets will not work

perhaps add some -I / -L option to configure

try configure -openssl -I /path/to/openssl/includes -L /path/to/openssl/library
Nicolas

This post has been edited 1 times, last edit by "Nicolas SOUCHON" (Feb 12th 2008, 12:33pm)

  • Go to the top of the page

10

Wednesday, February 13th 2008, 12:02pm

RE: How code for https url requests in Qt?

Quoted

Originally posted by Nicolas SOUCHON
if configure says OpenSSL support.............no.
sure ssl sockets will not work

perhaps add some -I / -L option to configure

try configure -openssl -I /path/to/openssl/includes -L /path/to/openssl/library


Thanks! I reconfigured Qt like this
configure -debug-and-release -openssl
migw32-make

Should I add some -l options to http.pro to make it work with ssl?
  • Go to the top of the page

11

Wednesday, February 13th 2008, 4:48pm

RE: How code for https url requests in Qt?

Quoted

Originally posted by Nicolas SOUCHON
if configure says OpenSSL support.............no.
sure ssl sockets will not work

perhaps add some -I / -L option to configure

try configure -openssl -I /path/to/openssl/includes -L /path/to/openssl/library


Installation guide for OpenSSL adviced me to copy opessl libs to C:/MinGW/lib and includes to C:/MinGW/includes.
I did it.
After that, I tried: configure -release -openssl -I C:/MinGW/include -L C:/MinGW/lib
mingw32-make
After that i launched C:\Qt\4.3.3\examples\network\http\release,
entered url https://sourceforge.net/.
The result was the message "Download failed: Found"
Please, any help!
  • Go to the top of the page

12

Thursday, February 14th 2008, 1:11am

  • Go to the top of the page

13

Thursday, February 14th 2008, 6:07pm

Quoted

Originally posted by codeslicer
Try it using https://sourceforge.net/index.php

Wrong!
  • Go to the top of the page

14

Friday, February 15th 2008, 1:15pm

Anyone, please, send me sources of working with https on win32 example network/http!
  • Go to the top of the page

15

Friday, February 15th 2008, 1:34pm

I'm on Linux
It's the same for me
I've add a slot to show ssl errors, I obtain

Quoted


QSocketNotifier: Invalid socket specified
QSocketNotifier: Internal error
QSocketNotifier: Invalid socket specified
QSocketNotifier: Internal error

I've allready used QSslSocket but not with QHttp, only QTcpServer
Nicolas
  • Go to the top of the page

Messenger

Intermediate

Posts: 426

Location: Lt

16

Friday, February 15th 2008, 1:36pm

Test with (or google for https sites) -
https://implicit.harvard.edu/
https://j3d-webstart.dev.java.net/test/
The Qt example works for me with addresses. The sourceforge address returns error to me too.
Linux, Qt 4.3.3.
Fighting fire with fire.
  • Go to the top of the page

17

Friday, February 15th 2008, 1:45pm

Quoted

Originally posted by Messenger
Test with (or google for https sites) -
https://implicit.harvard.edu/
https://j3d-webstart.dev.java.net/test/
The Qt example works for me with addresses. The sourceforge address returns error to me too.
Linux, Qt 4.3.3.

This urls do work!
And my doesn't
https://isasoft.ru/bg/cash
What to do?
  • Go to the top of the page

Messenger

Intermediate

Posts: 426

Location: Lt

18

Friday, February 15th 2008, 1:47pm

Program server side correctly.
I got message "Download failed: Server closed connection unexpectedly ".
Fighting fire with fire.
  • Go to the top of the page

19

Friday, February 15th 2008, 2:09pm

for me

ok with https://implicit.harvard.edu/

not ok with https://j3d-webstart.dev.java.net/test/
Server closed connection unexpectedly.
Nicolas
  • Go to the top of the page

20

Saturday, February 16th 2008, 1:48pm

Quoted

Originally posted by Messenger
Program server side correctly.
I got message "Download failed: Server closed connection unexpectedly ".

I got this message too.
But my browser works fine with this url.
Are you sure the problem is wrong server side?
  • Go to the top of the page

Rate this thread