Hi,

I’ve discovered that in my web application files that are uploaded via a form 
with Safari (v18.5) and Tomcat (v11.0.9) has HTTP/2 enabled, they're being 
corrupted. 

If I use Chrome (v137.0.7151.122) they upload without error and if I disable 
HTTP/2 on Tomcat, the files will upload without error when using Safari.

SHA256 Results:

Original Files
2ee389fa00d2190c5527eeb171c0eb7d8fe5a2f34c972954ba97c9675c4a0c84  sample.HEIC
8a2479fe45f93ff6901151817f257eccbdf0c673e3660124be90da5344f02958  sample.jpg
a5624f2b47bd8ee257bead36bb32a37ab4b01fa0675f608c1edf9c82c1a9f0f1  sample.pdf
e061f37ec0d2d64e74675287a9d93f22d7a4090193f60f1fdc5b9961f34b0f43  sample.txt
da0429d51bb6a11c3154c0d04a5fc3a6dcd902882e6ac9aa24532e1cebcc965c  sample.zip


Uploaded Files via Chrome HTTP/1.1 
2ee389fa00d2190c5527eeb171c0eb7d8fe5a2f34c972954ba97c9675c4a0c84  sample.HEIC
8a2479fe45f93ff6901151817f257eccbdf0c673e3660124be90da5344f02958  sample.jpg
a5624f2b47bd8ee257bead36bb32a37ab4b01fa0675f608c1edf9c82c1a9f0f1  sample.pdf
e061f37ec0d2d64e74675287a9d93f22d7a4090193f60f1fdc5b9961f34b0f43  sample.txt
da0429d51bb6a11c3154c0d04a5fc3a6dcd902882e6ac9aa24532e1cebcc965c  sample.zip

Uploaded Files via Chrome HTTP/2
2ee389fa00d2190c5527eeb171c0eb7d8fe5a2f34c972954ba97c9675c4a0c84  sample.HEIC
8a2479fe45f93ff6901151817f257eccbdf0c673e3660124be90da5344f02958  sample.jpg
a5624f2b47bd8ee257bead36bb32a37ab4b01fa0675f608c1edf9c82c1a9f0f1  sample.pdf
e061f37ec0d2d64e74675287a9d93f22d7a4090193f60f1fdc5b9961f34b0f43  sample.txt
da0429d51bb6a11c3154c0d04a5fc3a6dcd902882e6ac9aa24532e1cebcc965c  sample.zip

Uploaded Files via Safari HTTP/1.1
2ee389fa00d2190c5527eeb171c0eb7d8fe5a2f34c972954ba97c9675c4a0c84  sample.HEIC
8a2479fe45f93ff6901151817f257eccbdf0c673e3660124be90da5344f02958  sample.jpg
a5624f2b47bd8ee257bead36bb32a37ab4b01fa0675f608c1edf9c82c1a9f0f1  sample.pdf
e061f37ec0d2d64e74675287a9d93f22d7a4090193f60f1fdc5b9961f34b0f43  sample.txt
da0429d51bb6a11c3154c0d04a5fc3a6dcd902882e6ac9aa24532e1cebcc965c  sample.zip

Uploaded Files via Safari HTTP/2
872ed65f6143e72eb19a2824937f99f4628bc0a369e6b020e9121976104ed0df  sample.HEIC
34d5395731c764c32493b47f38f914700aaaaaf3b7fb0bce237073fdead8b9ec  sample.jpg
cda31f8111cd5f4910d1af62a3db1a23720e8a434f2f39e71bc68e95b1d0e817  sample.pdf
6b63f7c6c77ad89c783558b7ef99228cb4cebd2308a76fbd71c66f439886f12c  sample.txt
be9eddc53377cb229e4e78fdc4cd47084fb289e91733ce52e3c9e10a5ea59fdc  sample.zip

Nothing above uploaded correctly using Safari when Tomcat was using HTTP/2 
(sometimes they did, but very rarely). 

It’s a default install of Tomcat with the following set in server.xml:

<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol"
    maxThreads="150" SSLEnabled="true" compression="on">
  
  <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol"/>
 
  <SSLHostConfig>
    <Certificate
      certificateKeystoreFile="/path/to/keystore.p12"
      certificateKeystorePassword="passwordgoeshere"
      type="RSA"/>
    </SSLHostConfig>
</Connector>

I thought it may have been Safari, but when using Jetty as the server, the 
files uploaded without corruption.. any suggestions on how to further diagnose 
this problem? I saw no errors in the catalina.out logs.. is there anywhere else 
I should be looking, something to enable debug logging from Tomcat? 

Thanks!



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to