Content-Encoding, Content-Range

2006-02-21 Thread Martin Thelian


Hi!

If I'd like to combine Content-Encoding gzip with Content-Range. Which 
offsets do I have to use in the request and response messages. Is the 
offset then pointing to a position in the original content or to a 
position in the encoded content? And what about the instance-length? Is 
it the length of the compressed or original resource?


Thank you!

Martin Thelian




Re: problems with a GET request

2006-03-30 Thread Martin Thelian


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.