You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/11/05 09:47:25 UTC
[Bug 57187] New: OPTIONS * failure
https://issues.apache.org/bugzilla/show_bug.cgi?id=57187
Bug ID: 57187
Summary: OPTIONS * failure
Product: Tomcat 8
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: remm@apache.org
OPTIONS * HTTP/1.1 is a valid request, but it fails in the resources mapping.
Probably as a result of the mapper/resources changes. This special URL should
probably not go that far into the mapping process in the first place.
05-Nov-2014 09:04:41.708 SEVERE [http-nio-8083-exec-3]
org.apache.coyote.http11.AbstractHttp11Processor.process Error
processing request
java.lang.IllegalArgumentException: The resource path [*] is not valid
at
org.apache.catalina.webresources.StandardRoot.validate(StandardRoot.java:250)
at
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:212)
at
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:206)
at
org.apache.catalina.mapper.Mapper.internalMapWrapper(Mapper.java:999)
at org.apache.catalina.mapper.Mapper.internalMap(Mapper.java:817)
at org.apache.catalina.mapper.Mapper.map(Mapper.java:685)
at
org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:872)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:532)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1556)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1513)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57187] OPTIONS * failure
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57187
Remy Maucherat <re...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Remy Maucherat <re...@apache.org> ---
r1637839
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57187] OPTIONS * failure
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57187
--- Comment #6 from jfclere <jf...@gmail.com> ---
basically OPTIONS * shouldn't be mapped to anything just answered as it is like
the CPING/PONG of AJP.
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57187] OPTIONS * failure
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57187
--- Comment #4 from Remy Maucherat <re...@apache.org> ---
OPTIONS * means an OPTIONS method applied to the whole server, it is used my
mod_cluster to ping. This is a valid request, which should be processed by the
default servlet as it is now. For any other methods, the 404 looked decent.
Looking at the code, I'm not sure what the best option is, since "*" is really
invalid as a file path in the resources, and should continue to be rejected
with an exception in validate.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57187] OPTIONS * failure
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57187
--- Comment #1 from Remy Maucherat <re...@apache.org> ---
Additional note: Tomcat 7 returns a response that looks correct:
OPTIONS * HTTP/1.1
Host: localhost
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Allow: GET, HEAD, POST, PUT, DELETE, OPTIONS
Content-Length: 0
Date: Wed, 05 Nov 2014 08:51:16 GMT
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57187] OPTIONS * failure
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57187
Remy Maucherat <re...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Remy Maucherat <re...@apache.org> ---
Fix in r1636850 for 8.0.16.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57187] OPTIONS * failure
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57187
--- Comment #5 from Remy Maucherat <re...@apache.org> ---
Another possibility (looking at the code) is to deal with * in
CoyoteAdpater.postParseRequest before mapping, and only OPTIONS would return a
non 404 response.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57187] OPTIONS * failure
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57187
Konstantin Kolinko <kn...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #3 from Konstantin Kolinko <kn...@gmail.com> ---
REOPENing, as I think there is still more to it.
With current trunk:
GET * HTTP/1.1
Host: a
Expected: Error 400 or error 404 (depends on what is written is the spec, I
have not looked there yet). Tomcat 7 returns 404.
Actual: Error 500 with a stacktrace
java.lang.IllegalArgumentException: The resource path [*] is not valid
at
org.apache.catalina.webresources.StandardRoot.validate(StandardRoot.java:251)
at
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:212)
at
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:206)
at
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:716)
at
org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:411)
GET ? HTTP/1.1
Host: a
GET foo HTTP/1.1
Host: a
Expected=Actual: Error 400, as expected.
Other invalid URLs are rejected early. There is special processing for "*" in
CoyoteAdapter.normalize(MB) that allows it to survive.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org