You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2008/10/28 21:53:54 UTC

DO NOT REPLY [Bug 46112] New: POST with multi-part form doesn't work

https://issues.apache.org/bugzilla/show_bug.cgi?id=46112

           Summary: POST with multi-part form doesn't work
           Product: JMeter
           Version: 2.3.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: brian@planetoberman.com


In 2.3.2, new functionality was added to support multi-part form with post.

This functionality does not work in 2.3.2 with a multi-part form file upload.

Both recording with the http proxy, and the actual test plan does not work with
this configuration.

It appears that the 8bit encoding is the issue.

That is each form field posting gets these 2 lines

Content-Type: text/plain; charset=iso-8859-1 
Content-Transfer-Encoding: 8bit 

When I test with a browser, and sniff the traffic, and my app works, these 2
attributes are not present.

I have not found a workaround using jmeter.properties.

I took my 2.3.2 test plan, and ran in 2.2 and my plan works.  In 2.2, only 1
file could be uploaded, and the new multi-part form post option did not exist,
but the plan works with 2.2 and not in 2.3.2.  

It appears either the content type and/or content-transfer-encoding is causing
the test plan to not work in 2.3.2.

Interestingly enough, in 2.3.2, the tree results viewer considers the call a
success, but that is only because of a 200 return code, but no result shows up
in the response part, and the files uploaded are not received on the server
end.

I found this issue on other web posts...here is one that shows the same type of
encoding I am seeing.

http://www.nabble.com/Problem-with-the-JMeter-HTTP-Proxy-td19435675.html


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

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 46112] POST with multi-part form doesn't work

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46112


Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEEDINFO




--- Comment #7 from Sebb <se...@apache.org>  2008-11-08 08:41:43 PST ---
There are rather a lot of samplers in the JMX file; I assume it is the
CreateEvent one that is causing the problem, as that is the one with two files.

As far as I can tell, the body generated by JMeter is perfectly valid - see for
example http://www.ietf.org/rfc/rfc2388.txt section 4.5.

The Content-Type and Content-Transfer-Encoding headers are optional, but are
allowed in form-data.

It looks like the server application is not handling these optional headers
correctly.

Are there any error messages in the server log file?
Does the response page from the server give any indication that the request has
not been accepted? If not, then ISTM that the server application is broken.

Can you provide the HTML for the form that generates the request?
This would make it easier to try things out.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 46112] POST with multi-part form doesn't work

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46112


Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




--- Comment #2 from Sebb <se...@apache.org>  2008-11-06 15:07:57 PST ---
We'll need a bit more information to try and determine what is going on here.

Can you attach the test plan (JMX) file to this bug report - after redacting
any sensitive information?

If you can attach a sample that can be used with a public server, so much the
better.

Also useful is the jmeter log file.

Also, it might be worth trying the HttpClient version of the HTTP Sampler if
you are currently using the default.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 46112] POST with multi-part form doesn't work

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46112





--- Comment #4 from Brian Oberman <br...@planetoberman.com>  2008-11-07 09:29:38 PST ---
Created an attachment (id=22840)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22840)
jmeter 2.3.2 log file


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

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 46112] POST with multi-part form doesn't work

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46112





--- Comment #3 from Brian Oberman <br...@planetoberman.com>  2008-11-07 09:28:37 PST ---
Created an attachment (id=22839)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22839)
HTTPReqeust being sent in..


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

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 46112] POST with multi-part form doesn't work

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46112


Brian Oberman <br...@planetoberman.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME




--- Comment #10 from Brian Oberman <br...@planetoberman.com>  2008-11-13 08:00:24 PST ---
Okay, I must apologize.

I changed the server side from proprietary file upload code to Apache Commons
File Upload component.  

And now jmeter 2.3.2 works with the exact same test plan.

So it does appear, that the old file upload code was flawed when it came to
multi-part form posts.

I apologize for not figuring this out sooner.

Thanks for all your attention to detail and assistance.

You may close this bug.

Brian


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

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 46112] POST with multi-part form doesn't work

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46112


Brian Oberman <br...@planetoberman.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |ASSIGNED




--- Comment #8 from Brian Oberman <br...@planetoberman.com>  2008-11-08 08:55:53 PST ---
Yes, you are correct.  CreateEvent is the one I am having issues with.

There is no indication of a problem on the server logs.  In fact it responds
with a HTTP status 200.....

When I get on my work laptop again, I will send the HTML page to you.

I also am starting to think that this is a server side problem with handling
the multipart-form post as when I look at the way the sample submits to the
server in jmeter 2.2 vs. 2.3.2 it is different.

And maybe, just maybe, the server side is not handling properly and also
swallowing down all indications of a problem (no logs) silently (ugh).

I have since re-written the file upload code to use Apache Commons File Upload
component...and will re-test 2.3.2 with that on the server side.  

I will post those results, but that probably will not be til Wed.

Thanks again for your assistance and interest.  


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

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 46112] POST with multi-part form doesn't work

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46112





--- Comment #1 from Brian Oberman <br...@planetoberman.com>  2008-10-28 13:55:09 PST ---
This is my first bug report.  Please let me know if there is anything I should
have included.  Thanks for any assistance!


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

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 46112] POST with multi-part form doesn't work

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46112


Brian Oberman <br...@planetoberman.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |ASSIGNED




--- Comment #6 from Brian Oberman <br...@planetoberman.com>  2008-11-07 09:36:03 PST ---
I have submitted the requested/needed additional information.

1. JMX test plan (with sensitive data redacted)
2. input from the problem http request
3. the jmeter log file

Please note I have tested with both HTTP samples (HTTPClient and the default
one) and both suffer from the same problem from my testing.

If I can be of further assistance, please let me know.

Thank you for everything!


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

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 46112] POST with multi-part form doesn't work

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46112


Brian Oberman <br...@planetoberman.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |brian@planetoberman.com




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

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 46112] POST with multi-part form doesn't work

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46112


Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW




--- Comment #9 from Sebb <se...@apache.org>  2008-11-08 09:17:42 PST ---
(In reply to comment #8)
> Yes, you are correct.  CreateEvent is the one I am having issues with.
> 
> There is no indication of a problem on the server logs.  In fact it responds
> with a HTTP status 200.....

Yes, that is to be expected, but does the response page give any indication
that the request failed? 

For example a failed login would normally return status 200 and the only
indication of failure is the text on the page.

> When I get on my work laptop again, I will send the HTML page to you.

Thanks.

> I also am starting to think that this is a server side problem with handling
> the multipart-form post as when I look at the way the sample submits to the
> server in jmeter 2.2 vs. 2.3.2 it is different.
>
> And maybe, just maybe, the server side is not handling properly and also
> swallowing down all indications of a problem (no logs) silently (ugh).

So long as the response page reports the error to the user in some way, there's
no need to log it as well.

Though it might help the server admin people to determine the cause if users
call in about problem.

> I have since re-written the file upload code to use Apache Commons File Upload
> component...and will re-test 2.3.2 with that on the server side.  
> 
> I will post those results, but that probably will not be til Wed.

OK.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 46112] POST with multi-part form doesn't work

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46112





--- Comment #5 from Brian Oberman <br...@planetoberman.com>  2008-11-07 09:34:19 PST ---
Created an attachment (id=22841)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22841)
JMX Test Plan

name of jmx plan doesn't match the jmeter.log file plan name due to saving test
plan under separate name to redact sensitive information


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

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org