Hi!

Which java class do you use to connect to the server? A HttpURLConnection, or do you open a connection using a simple socket? If the second is true, maybe you have forgotten to do a flush on the OutputStream.

Regards,
Martin

Francesco DEste schrieb:
Hallo,
i'm developing a small application in Java that needs to connect to a web server and ask for different chunks of the same file ( for example: i need the header of an mp3 and a small chunk of the middle part ). I tried to code my little HTTP 1.1 client and all was working well with a "standard" GET request. I'm getting problems when i insert Range: bytes = offset1-offset2 in the request. The webserver ( i tried it on Apache and Microsoft's IES) replies with a correct header, then waits SEVERAL seconds before sending me the chunk that i requested. My application is aimed to be time - critical, so i can't wait 10 seconds before getting the file part i need. The thing is really strange: if i ask the whole file it takes less to transfer than the first 10 bytes! Anyone has an idea please? Thanks. Francesco D'Este.


Reply via email to