Bug 40233 - proxy: bad content-type support
Summary: proxy: bad content-type support
Status: RESOLVED DUPLICATE of bug 40383
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.2
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2006-08-11 15:38 UTC by Carlo Marchiori
Modified: 2007-02-12 16:19 UTC (History)
0 users

a corrected implementation (6.38 KB, text/plain)
2006-08-11 15:40 UTC, Carlo Marchiori

Note You need to log in before you can comment on or make changes to this bug.
Description Carlo Marchiori 2006-08-11 15:38:01 UTC
The class org.apache.jmeter.protocol.http.sampler.PostWriter seems to think there
are only two possible content types as is appears from the following snippet:

if ((filename != null) && (filename.trim().length() > 0)) 
    "multipart/form-data; boundary=" + BOUNDARY); // $NON-NLS-1$
// No filename specified, so send the post using normal syntax
"application/x-www-form-urlencoded"); // $NON-NLS-1$

The unwanted effect is that the proxy cannot handle client that use other
content-type such as text/xml (as in ajax applications).
Comment 1 Carlo Marchiori 2006-08-11 15:40:42 UTC
Created attachment 18699 [details]
a corrected implementation

This proposed fix simply remove the line that sets the content type in the
non-multipart case
Comment 2 Sebb 2007-02-12 16:19:32 UTC
Fixed - see bug 40383

*** This bug has been marked as a duplicate of 40383 ***