Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
omari wrote on Sun, 17 April 2016 22:10
the 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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: HttpRequest : Add custon authentication capability
Next Topic: NTLM Authentication for HttpRequest
Goto Forum:
  


Current Time: Mon May 06 11:23:41 CEST 2024

Total time taken to generate the page: 0.03522 seconds