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 2004/08/19 07:43:09 UTC
DO NOT REPLY [Bug 30746] New: -
request.getProtocol() can return null
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=30746>.
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=30746
request.getProtocol() can return null
Summary: request.getProtocol() can return null
Product: Tomcat 5
Version: 5.0.27
Platform: All
URL: http://exo.sourceforge.net/forum/viewtopic.php?p=1835#18
35
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Servlet & JSP API
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: nlothian@apache.org
CC: nlothian@apache.org
Under some circumstances request.getProtocol() can return null. This breaks
HttpServlet
http://exo.sourceforge.net/forum/viewtopic.php?p=1835#1835 has the complete
story of this bug, but briefly:
1) The Portlet Spec requires "The following methods of the HttpServletRequest
must return null: getProtocol, getRemoteAddr, getRemoteHost, getRealPath, and
getRequestURL." (from PLT.16.3.3 of the portlet spec).
2) When using the EXO portlet container with the spring framework portlet
support Tomcat throws a NPE when including the view servlet in response to a
POSTed request.
While it is arguable if this is a bug in Tomcat or something else, it would be
very helpful if Tomcat included NP checks when checking the protocol.
ie:
HttpServlet.doPost(HttpServletRequest req, HttpServletResponse resp)
should do:
if ((protocol != null) && protocol.endsWith("1.1")) {...
and doGet(HttpServletRequest req, HttpServletResponse resp) should have the same
thing
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org