httprequest_get_state seems to return 4 way too early - it says Download complete when only 288 bytes out of 7kb are downloaded
edit: I simply needed to add httprequest_set_request_header(rq, "Connection", "keep-alive",true); so that the request doesnt die after the initial connection 
Normally you shouldn't have to do this, the web server should close the connection only after the file has been downloaded completely. Setting 'connection' to 'keep-alive' means the server won't close the connection even when the transfer is complete, so you can send a second request with the same connection (the DLL doesn't support this though). I'm surprised this works for you ...
new question: What will happen if I try to get the Content-Length header if it doesnt exist?
The function will return an empty string.
@Buff-Robotix: I don't know why it doesn't work. Maybe they are blocking your request because they don't like automated requests?
Edited by Maarten Baert, 23 September 2011 - 12:41 PM.