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 2006/12/15 14:45:35 UTC

DO NOT REPLY [Bug 41179] New: - 400 Bad Request response during auto re-deployment

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41179>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41179

           Summary: 400 Bad Request response during auto re-deployment
           Product: Tomcat 5
           Version: 5.5.20
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: felix.gnass@neteye.de


When you re-deploy the root war file using autoDeploy="true", Tomcat sends a
response with status code 400 (Bad Request: No host matches ...).

This makes it impossible to serve a custom error document with Apache + mod_jk
since the request processing is immediately halted to guard against security
problems caused by bad requests. (See:
http://httpd.apache.org/docs/2.0/mod/core.html#errordocument)

RFC 2616 (section 10.4.1) says about status code 400: "The request could not be
understood by the server due to malformed syntax. The client SHOULD NOT repeat
the request without modifications"

The thing is, that there's nothing wrong with the client's request. It's not a
syntactical issue and indeed the client SHOULD repeat the request.

I wonder whether a 404, 500 or 503 wouldn't be more appropriate here, at least
this would allow one to serve a custom error document during re-deployments.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 41179] - 400 Bad Request response during auto re-deployment

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41179>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41179





------- Additional Comments From yoavs@computer.org  2007-03-25 15:21 -------
I see what you mean, and it's indeed a PITA.  The relevant code is in
org.apache.catalina.core.StandardEngineValve#invoke(Request, Response).  The
problem is that this code is generic enough that you can't tell why
request.getHost() returns null.  It could be a normal webapp redeployment, or it
could be an actual error.

Thinking about, it seems like a 404 SC_NOT_FOUND is the better response here,
since we couldn't find a virtual Host to service the request.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 41179] - 400 Bad Request response during auto re-deployment

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41179>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41179





------- Additional Comments From remm@apache.org  2007-03-25 16:09 -------
I used 400 for no particular reason. Using another status code could be better
(or worse).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org