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 #46324 is a reply to message #46292] |
Tue, 19 April 2016 11:36 |
omari
Messages: 266 Registered: March 2010
|
Experienced Member |
|
|
Mirek, you are right,
when ReadingTrailer return true, we do not call Finish().
but the actual implementation of ReadingTrailer fail when a Trailer is present.
it miss the part :
if(data.GetCount() > 3) {
const char *h = data.Last();
if(h[0] == '\n' && (h[-1] == '\r' && h[-2] == '\n' || h[-1] == '\n'))
return false;
}
(as ReadingHeader)
bool HttpRequest::ReadingTrailer()
{
for(;;) {
int c = TcpSocket::Get();
if(c < 0)
return !IsEof();
else
data.Cat(c);
if(data.GetCount() == 2) {
if(data[0] == '\r' && data[1] == '\n')
return false;
}
if(data.GetCount() > 3) {
const char *h = data.Last();
if(h[0] == '\n' && (h[-1] == '\r' && h[-2] == '\n' || h[-1] == '\n'))
return false;
}
}
}
regards
omari.
[Updated on: Tue, 19 April 2016 11:36] Report message to a moderator
|
|
|
|
|
[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 11 23:36:22 CEST 2024
Total time taken to generate the page: 0.02639 seconds
|