Summary: | 400 Bad Request response during auto re-deployment | ||
---|---|---|---|
Product: | Tomcat 5 | Reporter: | Felix Gnass <felix.gnass> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P5 | ||
Version: | 5.5.20 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Felix Gnass
2006-12-15 05:45:34 UTC
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. I used 400 for no particular reason. Using another status code could be better (or worse). This has already been fixed in 7.0.x and 6.0.x. I have proposed a back-port of the necessary changes for 5.5.x This has been fixed in trunk and will be in 5.5.34 onwards. |