Jetty
  1. Jetty
  2. JETTY-403

FileResource breaks response stream of large file when using range header

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.1.5
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Mentioned problem is caused by casting of count long value into int type in writeTo(OutputStream out,long start,long count) method of org.mortbay.resource.Resource class.
      If count argument has nonnegative value exceeding scope of int type then not all data will be copied to output stream. Look at the following line:

      line 493: IO.copy(in,out,(int)count);

      whilst it should be:

      line 493: IO.copy(in,out,count);

      This bug exists also in Jetty 5.

        Activity

        Hide
        Greg Wilkins added a comment -

        Fixed in svn head.

        Do you mind telling me what client you are using that does range requests. The only one I know if
        is acroread, so I am keen to know of more to justify the hard work implementing range support.

        cheers

        Show
        Greg Wilkins added a comment - Fixed in svn head. Do you mind telling me what client you are using that does range requests. The only one I know if is acroread, so I am keen to know of more to justify the hard work implementing range support. cheers

          People

          • Assignee:
            Unassigned
            Reporter:
            Marek Grochowski
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: