You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2005/12/01 17:50:19 UTC

DO NOT REPLY [Bug 37739] New: - mod_proxy seems cut off some mime headers if used with mod_ssl

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=37739>.
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=37739

           Summary: mod_proxy seems cut off some mime headers if used with
                    mod_ssl
           Product: Apache httpd-2.0
           Version: 2.0.55
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: marco.casavecchia@comune.ancona.it


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)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org