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 #46335 is a reply to message #46332] Fri, 22 April 2016 17:08 Go to previous messageGo to previous message
omari is currently offline  omari
Messages: 266
Registered: March 2010
Experienced Member
Thanks Mirek, it work well for this scenario.

there are two other small bugs that appears with KeepAlive:

1 - Finish() calls Close() (at line 833), but in keep_alive mode, it should not
	if(!keep_alive)Close();


2 - there is a blocking, when response has Content-Length = 0, for example:
HTTP/1.0 200 OK
Date: Fri, 31 Dec 1999 23:59:59 GMT
Server: Apache/0.8.4
Content-Type: text/html
Content-Length: 0
Expires: Sat, 01 Jan 2000 00:59:59 GMT
Last-modified: Fri, 09 Aug 1996 14:21:40 GMT




a possible solution (tested) is in ReadingBody()
replace:
	if(count > 0)
		n = (int)min((int64)n, count);


by
	if(count == 0)
		return false;
	n = (int)min((int64)n, count);


regards
omari.
 
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: Sun May 12 06:13:00 CEST 2024

Total time taken to generate the page: 0.02665 seconds