• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in range header

Sundar Ram
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my java applet, I wanted to get part of file to be accessed through
HTTP. So i use HTTP range header. The following code is used...

URL url = new URL("http://localhost/filename.au");
URLConnection connection = url.openConnection();
connection.setRequestProperty("Range", "bytes=0-23");
InputStream instream = connection.getInputStream();

When we execute the code in appletviewer, it returns 24 bytes
successfully. This works fine in appletviewer. But when we execute the
same in IE we get the whole file instead of 24 bytes. I dont understand
why it doesnt work in IE when it works in appletviewer.
Another strange thing which i noticed is, the same code works fine for
accessing a text file in IE, but fails only for audio file.

Is the problem because of any settings in the browser?? Is there any related links available?

Kindly help

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic