jmeter icon indicating copy to clipboard operation
jmeter copied to clipboard

Can't add fields to Multipart body headers

Open asfimport opened this issue 15 years ago • 2 comments

Romuald (Bug 49949): When using the HTTPClient tool, we can attach a file or many and name it but in some occasions we would be interested in adding header aside from the usual Content-Disposition and Content-Type, Content-Transfer-Encoding.

Some applications like SAP with their Archivelink HTTP interface are adding fields there (X-compId as an example).

Therefore for such applications it is not possible to simulate a file upload with a POST request as the backend webserver is not able to manage it (doesn't receive the missing header field).

In the attached screenshot I have highlighted in yellow the piece that I would like to configure the same way we can do with the HeaderManager for example.

Hope I didn't use bugzilla by mistake as I didn't find another location to post this enhancement request. If it is the case I am more than happy to post it at the right place.

Thanks.

Created attachment Capture.JPG: Screenshot of a HTTP Request dump with MS NETMON 3.3

Screenshot of a HTTP Request dump with MS NETMON 3.3

OS: Windows Vista

asfimport avatar Sep 17 '10 07:09 asfimport

Sebb (migrated from Bugzilla): As a work-round, you could create a file containing the complete POST body, and upload that, see:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_Request

"If it is a POST or PUT request and there is a single file whose 'name' attribute (below) is omitted, then the file is sent as the entire body of the request, i.e. no wrappers are added. This allows arbitrary bodies to be sent."

asfimport avatar Dec 02 '10 18:12 asfimport

old thread but would be great feature. I'm also testing SAP content server specs. (create POST)

attached my JMeter working example (for the workaround from Sebb : send the entire body) icc4sap-loadtest-base.jmx.txt

import is to deselect (to make sure the entire body will be send without modification) sshot-2024-01-19-115812

TiloGit avatar Jan 19 '24 20:01 TiloGit