Home » U++ Library support » U++ MT-multithreading and servers » [FIXED]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC) [message #46320 is a reply to message #46318] |
Mon, 18 April 2016 17:44   |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
omari wrote on Sun, 17 April 2016 22:10the trailer part of http response is optional.
an empty line("\r\n") after the last chunk, mean that there is no trailer at all.
in this case, we should go to the next phase : Finish().
bool HttpRequest::ReadingTrailer()
{
for(;;) {
int c = TcpSocket::Get();
if(c < 0)
return !IsEof();
If there is no trailer (or less than 2 characters at the end of stream), it should return false, right?
I believe that calling Finish in all cases is simply wrong - if there is not trailer, it is possible it does not get read. Now obviously, it perhaps does not matter much, unless you are in KeepAlive mode, where you IMO really need trailer to tell the end of each HTTP request.
Mirek
|
|
|
 |
|
[FIXED]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: omari on Fri, 08 April 2016 19:44
|
 |
|
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: mirek on Sun, 17 April 2016 08:58
|
 |
|
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: omari on Sun, 17 April 2016 11:37
|
 |
|
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: mirek on Sun, 17 April 2016 14:43
|
 |
|
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: omari on Sun, 17 April 2016 22:10
|
 |
|
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: mirek on Mon, 18 April 2016 17:44
|
 |
|
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: omari on Mon, 18 April 2016 19:02
|
 |
|
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: mirek on Tue, 19 April 2016 11:01
|
 |
|
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: omari on Tue, 19 April 2016 11:36
|
 |
|
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: mirek on Fri, 22 April 2016 09:33
|
 |
|
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: omari on Fri, 22 April 2016 17:08
|
 |
|
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: mirek on Mon, 25 April 2016 13:52
|
 |
|
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: mirek on Mon, 25 April 2016 13:57
|
 |
|
Re: [BUG]HttpRequest hangs when Chunked response, without trailer, and KeepAlive is set. (patch & TC)
By: omari on Tue, 19 April 2016 11:42
|
Goto Forum:
Current Time: Sat May 10 02:53:50 CEST 2025
Total time taken to generate the page: 0.00410 seconds
|