[Qt-interest] Persistent HTTP connections

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Thu Feb 18 10:26:28 CET 2010


>>
>
> What do you mean? It can't send a header after the request is already
> processed&finished

ummm...you're right. dumb question! "Connection close" header is going
to be sent in the request itself, and not after the response has
finished. my bad.

>>
>> Basically, I want to send my _second_ http request using the same
>> connection that was setup when the first HTTP request was made. If i
>> simply make the second request after the first one finished, will it
>> reuse the same connection? If not, how can this be achieved?
>>
>
> In theory, it should work like that. Have you tried checking with a network
> sniffer? If it's not like that, we have a bug (or let's call it performance
> regression) in Qt.

Thats exactly what I'm trying now...using a sniffer.
>
> To be very sure, I would suggest to not create and send the request from the
> finished() slot but one event loop spin after that. You can achieve this by
> using a single shot timer set to 0 msec and sending the request from the
> timer's slot.
>
Thanks for this tip.

Regards,
-mandeep

>
> Markus
>



More information about the Qt-interest-old mailing list