I have an Apache web server that serves java applications with mod_proxy over ssl. In this application there is a page that lets users to upload binary files. When the proxy works over http (without SSL) all the things works good, but when I switch the proxy from clear http to SSL the POST of binary data to the sever lacks of some MIME headers. In other words: 1) Client --(http)--> Apache(mod_proxy) ---------(http)->Tomcat Application [OK] 2) Client --(https)--> Apache(mod_ssl+mod_proxy)-(http)->Tomcat Application [KO] I sniffed the connection between Apache and Tomcat with tcpdump and the dump of the 2 connections follows: --------8<------8<----[Case 1 Start]-----8<-------8<----------- POST /studiare/comunicazioni/uploadFile.do?operazione=inserisci&queryParam=Successful HTTP/1.1^M Host: comancona5.comune.ancona.it:8180^M User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 Firefox/1.0.7^M Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5^M Accept-Language: en-us,en;q=0.5^M Accept-Encoding: gzip,deflate^M Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7^M Referer: http://www.ankonascuola.it/studiare/comunicazioni/upload.do?subdirectory=WEB-INF/allegati/10^M Cookie: JSESSIONID=91BE6C6E3F6792B2F45F539AA3BD7ECC^M Content-Type: multipart/form-data; boundary=---------------------------13517973694920679171504569917^M Max-Forwards: 10^M X-Forwarded-For: 81.117.60.241^M X-Forwarded-Host: www.ankonascuola.it^M X-Forwarded-Server: www.ankonascuola.it^M Content-Length: 94199^M ^M -----------------------------13517973694920679171504569917^M Content-Disposition: form-data; name="theFile"; filename="Manuale_COFAX.doc"^M Content-Type: application/msword^M ^M ÐÏ^Qࡱ^Zá^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@;^@^C^@þÿ ^@^F^@^@^@^@^@^@^@^@^@^@^@^B^@^@^@´^@^@^@^@^@^@^@^@^P^@^@^B^@^@^@^A^@^@^@þÿÿÿ^@^@^@^@^@^@^@^@~@^@^@^@ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿþÿÿÿ^M^@^@^@^E^@^@^@^F^@^@^@^G^@^@^@^H^@^@^@ ^@^@^@@ [SNIP] --------8<------8<----[Case 1 End]-----8<-------8<----------- --------8<------8<----[Case 2 Start]-----8<-------8<----------- POST /studiare/comunicazioni/uploadFile.do?operazione=inserisci&queryParam=Successful HTTP/1.1^M Host: comancona5.comune.ancona.it:8180^M User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 Firefox/1.0.7^M Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5^M Accept-Language: en-us,en;q=0.5^M Accept-Encoding: gzip,deflate^M Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7^M Referer: https://www.ankonascuola.it/studiare/comunicazioni/upload.do?subdirectory=WEB-INF/allegati/10^M Cookie: JSESSIONID=FAAF6563D8ADE2DFA1C6EED5C8654983^M Content-Type: multipart/form-data; boundary=---------------------------14979831520386643701129566413^M Max-Forwards: 10^M X-Forwarded-For: 81.117.60.241^M X-Forwarded-Host: www.ankonascuola.it^M X-Forwarded-Server: www.ankonascuola.it^M Content-Length: 94199^M ^M ^D~Eá^@~Vu/¹^Y^P^Q[hGUê~X~GK*bÃ^L¶ìf´~[arâ~X«Æ~AS)ÇË^R~@p.~FEl~Y@mB^@í^S4~F~Ss^@1gu^TFä ¼Ïu^]~Jâ~XË^L~B÷X>ü¢^D~K~I¹hD»~M%Ð^A^?x~_ Þ;5úÃI??2òøa ºøæÅ| Xð^_; [SNIP] --------8<------8<----[Case 2 End]-----8<-------8<----------- It seems that in the second case, after the "ContentLength" header, the first "boundary" was trimmed out.. this cause that the java application never find the binary data of the POST. (and send me a "Null Pointer Exception..) Hope this can help you to find what happened. PS: Note that the server is a "NameVirtualHost and the part of httpd.conf and ssl.conf follows: --------8<----------8<---[Start httpd.conf]-----8<-------------8<--------- <VirtualHost 81.117.60.253> ServerName www.ankonascuola.it DocumentRoot "/webhome/ankonascuola" ... <Location /studiare> Order deny,allow Deny from all Allow from all ProxyPass http://comancona5.comune.ancona.it:8180/studiare ProxyPassReverse http://comancona5.comune.ancona.it:8180/studiare </Location> ... </virtualhost> --------8<----------8<---[End httpd.conf]-----8<---------------8<--------- --------8<----------8<---[Start ssl.conf]-----8<-------------8<--------- <VirtualHost 81.117.60.253:443> # General setup for the virtual host DocumentRoot "/webhome/ankonascuola_ssl" ServerName www.ankonascuola.it:443 .... SetEnvIf User-Agent ".*MSIE.*" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 <Location /studiare> Order deny,allow Deny from all Allow from all ProxyPass http://comancona5.comune.ancona.it:8180/studiare ProxyPassReverse http://comancona5.comune.ancona.it:8180/studiare </Location> .... </Virtualhost> --------8<----------8<---[End ssl.conf]-----8<---------------8<--------- Sorry for my poor english :O)
This looks like bug 37145 to me. Please try the patch attached to this bug and let me know if it helps.
GREAT! The patch works very well! Thank you very much for your support and for your fast response. PS: Sorry for my late reply but I was in holiday. :O) *** This bug has been marked as a duplicate of 37145 ***