Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


how to download files with chunk encoding

  • Please log in to reply
1 reply to this topic

#1 SteelSlasher


  • Members
  • 20 posts
  • Local time:07:53 PM

Posted 25 July 2009 - 02:55 PM

I would not really post here if i wasnt desperate mainly because i am wii homebrew developer and the information i need is less programming than theory.

I read up on the http 1.1 specifications and looked up on how chunked encoded files are sent, i even looked at the pseudo code and repoduced it but that had led me here.

my http client runs the following procedures to dechunk a response

read tcp stream until CRLF for chunk size(carriage return line feed)
convert hex size to decimal
begin while loop as long as chunk size is not 0
append chunk size to global size
read next line until CRLF
check response and size
append to variable containing response
read next line until CRLF for next chunk size
end loop

read footers etc.

the problem i have is that the tcp function that i currently have will read all data to the CRLF but it doesnt seem to give any output at all

the function i used to recieve chunks is the same function i use to read the headers, am i supposed to send some kind to "sub"request or should i read chunks in an alternate way to the headers

if you would like to see any code just ask

BC AdBot (Login to Remove)


#2 SteelSlasher

  • Topic Starter

  • Members
  • 20 posts
  • Local time:07:53 PM

Posted 27 July 2009 - 06:01 AM

*BUMP* i could really do with some help on this

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users