[Qt-interest] weird problem with QNetworkAccessManager and posting-requests

Benjamin bebl at mageta.org
Fri Apr 29 16:27:18 CEST 2011


Am 28.04.2011 09:38, schrieb Mandeep Sandhu:
> Hmmm...the FIN flag would mean the client aborted or tore down its TCP
> connection, right? And probably that explains why the finished signal
> is not emitted.
>
> Could there be any other code path where you're aborting this request?
>
> As for the double append, i have no clue. :/
>
> Does this webserver support GET request for the same action (the one
> you're trying to do with POST)? If it does, maybe you can check to see
> if GET behaves properly.
>

Yes, it is most likely that the signal is not sent, because the fin-flag 
was set. But I don't even know how someone can influence this, in this 
high-level-qt-abstraction. I mean, you don't have to deal with 
tcp/ip/... although I could, but why cause myself more pain than I have to?

The included objects are only connected through the finished-signal of 
the QNetworkAccessManager. As I said, I'm not aware of any other 
possible concurrent-situation in my program. There are only 2 threads, 
the main-gui-thread which idles during network-operations (the gui 
itself is deactivated), and the network-worker-thread, which runs its 
own cycle to process the signals of the QNetworkAccessManager. But while 
the request is sent, there is no other activity in my code. The method 
does 'return' immediately after the request is sent.

My own web-server can use GET, 'cause I can make him to :D. But I don't 
have this access on the "production-server".

Meanwhile I dug out some old windows-machine and the problem does also 
occur with the binary build of qt on windows.

best regards,
- Ben



More information about the Qt-interest-old mailing list