It will send the preview images chunked, regardless of whether you tell it you only support identity encoding or http/1.0 or want to use connection:close. You can't filter out the chunk borders using torkscript as you can't parse the binary data, so you'll need an external webserver to fix that or ask badspot to add a way to download the images without chunked transfer.
-snip-
The site isn't chunked, it's the preview images that are chunked. It's definitely the site. Also, I remember it sending out non-chunked image when you request with http/1.0. Maybe Badspot changed it, but it definitely used to work that way.
//Called when a binary chunk is received. To use with your mod, replace "TCPClient" with your class name.//Only called when in binary mode.//@param int chunk The number of bytes received.function TCPClient::onBinChunk(%this, %chunk){ //Damn inheritance is broken in the engine. if(isFunction(%this.className, "onBinChunk")) eval(%this.className @ "::onBinChunk(" @ %this @ ",\"" @ %chunk @ "\");"); %contentLength = %this.headerField["Content-Length"]; %contentLengthSet = (strLen(%contentLength) > 0); if($TCPClient::Debug) echo(" > " @ %chunk @ "/" @ %contentLength SPC "bytes"); if(%contentLengthSet) %this.setProgressBar(%chunk / %contentLength); if(%chunk >= %contentLength && %contentLengthSet) { %save = true; %done = true; } else { //this is a chunked/streaming transfer if(!%contentLengthSet) { %save = true; %done = false; } cancel(%this.timeoutSchedule); %this.timeoutSchedule = %this.schedule($TCPClient::timeout, "onDone", $TCPClient::Error::connectionTimedOut); } if(%save) { if(strLen(%this.savePath) && isWriteableFileName(%this.savePath)) { %this.saveBufferToFile(%this.savePath); if(%done) { %this.onDone($TCPClient::Error::none); } } else { %this.onDone($TCPClient::Error::invalidDownloadLocation); } }}
I remember that "new gui" system that used tcp objects to get an images of the server
I thought you said the images would be chunked even with a http/1.0 request. If they're still chunked, how could that code work?