2012/4/10 Nick Porter <[email protected]>:
>
> [NP] Yes. I can fathom no pattern to them. In fact, the only way I can
> actually see them is to packet trace the HTTP exchange.
You do not have AccessLogValve configured?!
I did the following to test how the standard Manager application
handles it. In 6.0.x and then in current 7.0.x.
1. Configured AccessLogValve in server.xml as following, to print
content-length headers of request and response:
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern='%h %l %u %t "%r" %s %b in:[%{content-length}i]
out:[%{content-length}o]'
/>
2. Prepared a two files by concatenating several copies of a zip
archive and renaming it to *.war.
"test.war" is 127,586,991 bytes
"test1.war" is 2,314,844,070 bytes
3. Started Tomcat, logged in into manager and tried to upload the
files as new web applications.
I am using Firefox 11.0, IE 8.0 both on Windows XP.
The results:
1). Uploading test.war (127Mb) in Firefox 11
Tomcat 6.0: OK
The first zip in concatenated file was unzipped as a new webapp.
Tomcat 7.0 Error 500, message
java.lang.IllegalStateException:
org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException:
the request was rejected because its size (127587196) exceeds the
configured maximum (52428800)
This behaviour of Tomcat 7 is expected, because of setting in its web.xml:
<multipart-config>
<!-- 50MB max -->
<max-file-size>52428800</max-file-size>
<max-request-size>52428800</max-request-size>
<file-size-threshold>0</file-size-threshold>
</multipart-config>
Access log:
Tomcat 6
127.0.0.1 - tomcat [10/Apr/2012:21:20:27 +0400] "POST
/manager/html/upload?org.apache.catalina.filters.CSRF_NONCE=772A4FDB8109600ACA1BB00FBDE37F07
HTTP/1.1" 200 16044 in:[127587194] out:[-]
Tomcat 7
127.0.0.1 - username [10/Apr/2012:21:17:57 +0400] "POST
/manager/html/upload?org.apache.catalina.filters.CSRF_NONCE=011354881097F245EB93726CF9F99CFE
HTTP/1.1" 500 2972 in:[127587196] out:[2972]
So everything is OK.
2). Uploading test1.war (>2Gb):
Both Tomcat 6 and Tomcat 7 close request immediately, responding with
status 400.
Looking into access log I see wrong value of content-length header
from the request.
The value is different between Firefox and IE, but both are wrong,
being negative.
(Apparently the browsers have different coding for
"multipart/form-data", with different overhead). The values are the
same for Tomcat 6 and 7.
This is from Tomcat 7 access log:
[[[
127.0.0.1 - - [10/Apr/2012:21:08:31 +0400] "POST
/manager/html/upload?org.apache.catalina.filters.CSRF_NONCE=B5B161E96A5566CCE5FA70AB6477B2B9
HTTP/1.1" 400 - in:[-1980123022] out:[-]
127.0.0.1 - - [10/Apr/2012:21:09:24 +0400] "POST
/manager/html/upload?org.apache.catalina.filters.CSRF_NONCE=2B89705754F848DE99DED1259DC376C1
HTTP/1.1" 400 - in:[-198012301] out:[-]
]]]
The first negative value is from Firefox. The second one is from IE.
I'll try to debug it later.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]