Status & Roadmap
Authors & License
Funding Ultimate++
Search on this site
Search in forums

SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » HTTP Agent & WebSSL memory leak
HTTP Agent & WebSSL memory leak [message #16780] Fri, 11 July 2008 09:35 Go to next message
phirox is currently offline  phirox
Messages: 49
Registered: December 2007
A small problem in Web/httpcli.cpp, the header "Agent: " should be "User-Agent: ", the first one doesn't even exist and I needed user-agent because certain websites give different results based upon it.

Also I recommend adding the following line to show a preference of UTF-8 instead of ISO-8859-1:
request << "Accept-Charset: UTF-8,*\r\n";

And in Web/WebSSL/util.cpp I need to comment the following line when using SSLClientSocket, because else I get a heap error on exiting:
CRYPTO_set_mem_functions(SSLAlloc, SSLRealloc, SSLFree);


Found another small bug, when a server sends back chunked data that is gzipped it tries to decode the body instead of chunked, fix for "String HttpClient::Execute(Gate2<int, int> progress)" in the last lines:

	if(tc_chunked) body = chunked;
	if(ce_gzip) body = GZDecompress(body);
	return body;

[Updated on: Mon, 14 July 2008 15:57]

Report message to a moderator

Re: HTTP Agent & WebSSL memory leak [message #19335 is a reply to message #16780] Thu, 27 November 2008 14:24 Go to previous message
phirox is currently offline  phirox
Messages: 49
Registered: December 2007
- bump -

Both bugs haven't been solved in the latest svn yet. The Agent header typo and the chunked-gzipped content(see prev. post for fixes).

I also found out the memory leak is not caused by Ultimate++ but openssl itself, apparently this is a known bug. The use of NTL memory manager just brings it forward. Also this only happens when you exit a program, so it really isn't that big of a problem.
Altough I would still recommend commenting it for now, until openssl comes with a fix(quite possibly a library_unload function).
Previous Topic: uploading progress
Next Topic: StaticMutex/ONCELOCK question
Goto Forum:

Current Time: Tue Aug 20 20:11:56 CEST 2019

Total time taken to generate the page: 0.00816 seconds