libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] MHD HTTPS IE vs. Firefox


From: Christian Grothoff
Subject: Re: [libmicrohttpd] MHD HTTPS IE vs. Firefox
Date: Sun, 24 Nov 2013 13:06:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

Hi!

I can't say for sure from your post, but I suspect that the
HTTP headers that are being sent are different; "CONTENT_TYPE"
would be wrong for both browsers, as it should be "Content-type"
(but maybe that's just your printing method).

Usually, a browser not setting all required headers is the most
common problem with processing POST requests (as MHD cannot
auto-correct this).

If you post a pcap file, it might be easier to say what's
exactly going on.  In any case, I'd expect that you should
be able to trace through the post processor with gdb to see
where processing differs.


Happy hacking!

Christian


On 11/21/13 13:43, Daniel Wunderlich wrote:
> Hi,
> 
> I made the experience, that my MDH behaves totally different between 
> processing a HTTPS POST request from IE 9.0 or Firefox ESR 24.0
> The IE request seems to be that way different, that my own PP_handler is 
> not called. I think that there is an error in parsing the multipart/form-
> data.
> 
> MHD_Version: 0.9.31, but the behavior is the same with previous versions 
> too.
> 
> ### Firefox ESR V24.0
> 
> Method: POST
> CONTENT_TYPE:multipart/form-data; boundary=---------------------------
> 824938965913
> Method: POST
> UPLOAD_DATA:-----------------------------824938965913
> Content-Disposition: form-data; name="user"
> 
> User A
> -----------------------------824938965913
> Content-Disposition: form-data; name="user1"
> 
> User B
> -----------------------------824938965913
> Content-Disposition: form-data; name="password1"
> 
> pwd
> -----------------------------824938965913
> Content-Disposition: form-data; name="fileupload"; filename="test.txt"
> Content-Type: text/plain
> 
> This is my Testfile!
> 
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> EOTF
> -----------------------------824938965913--
> UPLOAD_DATA_LENGTH(542)
> my_PP_Handler called...
> my_PP_Handler called...
> my_PP_Handler called...
> my_PP_Handler called...
> ret MHD_post_process=1
> Method: POST
> Requested URL: /dyn/processPOSTForm
> GET_PARAMS=0
> POST_PARAMS=3
> POST_PARAM: user=User A
> POST_PARAM: user1=User B
> POST_PARAM: password1=pwd
> 
> 
> 
> ### IE 9.0.8
> 
> Method: POST
> CONTENT_TYPE:multipart/form-data; boundary=---------------------------
> 7dd19e151060e
> Method: POST
> UPLOAD_DATA:-UPLOAD_DATA_LENGTH:(1)
> ret MHD_post_process=1
> Method: POST
> UPLOAD_DATA:----------------------------7dd19e151060e
> Content-Disposition: form-data; name="user"
> 
> User A
> -----------------------------7dd19e151060e
> Content-Disposition: form-data; name="user1"
> 
> User B
> -----------------------------7dd19e151060e
> Content-Disposition: form-data; name="password1"
> 
> pwd
> -----------------------------7dd19e151060e
> Content-Disposition: form-data; name="fileupload"; 
> filename="C:\Users\dwunderlich\Desktop\test.txt"
> Content-Type: text/plain
> 
> This is my Testfile!
> 
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
> EOTF
> -----------------------------7dd19e151060e--
> UPLOAD_DATA_LENGTH:(575)
> ret MHD_post_process=1
> Method: POST
> Requested URL: /dyn/processPOSTForm
> GET_PARAMS=0
> POST_PARAMS=0
> 
> 
> Do you have any idea what went wrong?
> 
> Thanks in advance for your help, Daniel
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]