I am running Tomcat 7.0.47 and it occasionally returns HTTP status codes
of 400, such as the following from my access log.
A 400 suggests a malformed request, but many of these are simple GET
requests on an image, so it seems odd they are malformed. We're not
positive, but it seems that as these occur on JSP requests, we appear to
be able to process a request though we get 'null' for various things
like request.getRequestURI(), request.getScheme(), etc.
I read something about these and perhaps character set encoding, and we
do have code like this at the beginning of our page processing (though
the cannot be directly tied as our JSP/servlets don't process images and
javascript requests):
try
{
if ( request.getCharacterEncoding() == null )
request.setCharacterEncoding(CHARSET_UTF_8);
response.setCharacterEncoding(CHARSET_UTF_8);
}
catch( UnsupportedEncodingException e )
{
app.warning("PageBean.init() - Failed to set request/response to
UTF-8 encoding.");
}
Here's our access log of some recent 400s:
199.231.xx.xxx - - [16/Apr/2014:12:16:31 -0400] "GET
/XXX/esfapp/images/esignFormsPlain.gif HTTP/1.1" 400 - 0 Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET
CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC
6.0; MS-RTC LM 8; .NET4.0C; .NET4.0E)
199.231.xx.xxx - - [16/Apr/2014:12:16:33 -0400] "GET
/XXX/esfapp/scripts/sorttable.js HTTP/1.1" 400 - 0 Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET
CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC
6.0; MS-RTC LM 8; .NET4.0C; .NET4.0E)
199.231.xx.xxx - - [16/Apr/2014:12:16:33 -0400] "GET
/XXX/esfapp/scripts/sorttable.js HTTP/1.1" 400 - 4 -
199.231.xx.xxx - - [16/Apr/2014:12:16:33 -0400] "GET
/XXX/esfapp/images/calendar20x14.gif HTTP/1.1" 400 - 0 Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET
CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC
6.0; MS-RTC LM 8; .NET4.0C; .NET4.0E)
160.109.NN.NN - - [16/Apr/2014:12:17:18 -0400] "GET
/NNNN/images/logoR.gif HTTP/1.1" 400 - 2 Mozilla/4.0 (compatible; MSIE
8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 1.1.4322; .NET
CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C)
160.109.NN.NN - - [16/Apr/2014:12:17:18 -0400] "GET
/NNNN/images/logoR.gif HTTP/1.1" 400 - 0 Mozilla/4.0 (compatible; MSIE
8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 1.1.4322; .NET
CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C)
71.220.ZZZ.ZZZ - - [16/Apr/2014:12:28:44 -0400] "GET
/ZZ/leaserenewal/js/form-functions.js HTTP/1.1" 400 - 0 Mozilla/5.0
(Windows NT 5.1; rv:28.0) Gecko/20100101 Firefox/28.0
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org