Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003766 [Resin] minor always 11-16-09 15:03 12-16-09 10:20
Reporter alex View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.8
Summary 0003766: file servlet throws ArrayIndexOutOfBoundsException with negative range
Description reported by Knut Forkalsrud
  Accept-Language: zh-cn,zh-hk,zh-tw,en-us
          User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
          Accept: */*
          Connection: Keep-Alive
          Range: bytes=-335544320--1162852624
          Accept-Encoding: gzip

This results in an exception like this:

at java.lang.System.arraycopy(Native Method)
at com.caucho.vfs.WriteStream.write(
at com.caucho.server.connection.ResponseStream.writeNext(
at com.caucho.server.connection.ToByteResponseStream.write(
at com.caucho.server.connection.ServletOutputStreamImpl.write(
at com.caucho.vfs.ReadStream.writeToStream(
at com.caucho.servlets.FileServlet.handleRange(
at com.caucho.servlets.FileServlet.service(
at com.caucho.server.dispatch.ServletFilterChain.doFilter(
at com.caucho.server.webapp.NamedDispatcherImpl.forward(
at com.mydomain.www.MyServlet.doGet(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at com.caucho.server.dispatch.ServletFilterChain.doFilter(
at com.caucho.server.webapp.WebAppFilterChain.doFilter(
at com.caucho.server.dispatch.ServletInvocation.service(
at com.caucho.server.http.HttpRequest.handleRequest(
at com.caucho.util.ThreadPool$Item.runTasks(
at com.caucho.util.ThreadPool$

(I'm forwarding the request to the FileServlet). No harm done here, the requests seems to fail
without causing any other side effects, but I'm wondering if the FileServlet should handle the
situation a little more gracefully and give a 4xx response code instead of throwing an exception,
which ends up being a 5xx response code.
Additional Information
Attached Files

- Relationships

- Notes
12-16-09 10:20


- Issue History
Date Modified Username Field Change
11-16-09 15:03 alex New Issue
12-16-09 10:20 ferg Note Added: 0004337
12-16-09 10:20 ferg Assigned To  => ferg
12-16-09 10:20 ferg Status new => closed
12-16-09 10:20 ferg Resolution open => fixed
12-16-09 10:20 ferg Fixed in Version  => 4.0.3

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker