jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Issue with Header Manager
Date Sun, 17 Sep 2006 16:54:17 GMT
On 17/09/06, R R <rarokni@hotmail.co.uk> wrote:
> Hi,
>
> I have a need to put in a custom HTTP request and am hoping to use the HTTP
> Header Manager to do this but I am seeing a odd issue with duplicate
> variable names:
>
> The reqest need to be something like:
>
> >>Request <<
>
> PUT /lisa/calendar/newevent.ics HTTP/1.1
> If-None-Match: *
> Host: cal.example.com
> Content-Type: text/calendar
> Content-Length: xxx
>
> BEGIN:VCALENDAR
> VERSION:2.0
> PRODID:-//Example Corp.//CalDAV Client//EN
> BEGIN:VEVENT
> UID:20010712T182145Z-123401@example.com
> DTSTART:20010714T170000Z
> DTEND:20010715T035959Z
> SUMMARY:Bastille Day Party
> END:VEVENT
> END:VCALENDAR

These are body content, not headers, surely?

> But when I put these values into the HTTP Header Manager there is a
> difference with with what Jmeter thinks its sending and what is actualy
> sent. In the sample request listener everything looks ok but by using
> Etherial I can see that when a variable is duplicated only the 2nd value is
> used.

This is due to the Http implementation, not JMeter. The stand Http
Sampler uses the following method:

void java.net.URLConnection.setRequestProperty(String key, String value)

For which the Javadoc says:

>>
Sets the general request property. If a property with the key already
exists, overwrite its value with the new value.

NOTE: HTTP requires all request properties which can legally have
multiple instances with the same key to use a comma-seperated list
syntax which enables multiple properties to be appended into a single
property.
<<

> So the above header actulay shows up as...
>
> PUT /lisa/calendar/newevent.ics HTTP/1.1
>
> Host: caldavlinux.oracle.com
> If-None-Match: *
> Content-Type: text/calendar
> BEGIN: VEVENT
> VERSION: 2.0
> PRODID: -//Example Corp.//CalDAV Client//EN
> UID:20010712T182145Z-123401@example.com
> DTSTAMP: 20060712T182145Z
> DTSTART: 20060714T170000Z
> DTEND: 20060715T040000Z
> SUMMARY: Bastille Day Party
> END: VCALENDAR
> Authorization: Basic cmV6YS5yb2tuaUBvcmFjbGUuY29tOnRlc3Qx
> User-Agent: Java/1.5.0_07
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
>
> As can be seen the BEGIN and END values are only getting picked up for the
> 2nd occurance of the value in the JMX file.
>
> Is there a known issue with this with any workarounds?

This is working as documented.

As far as I can tell, the VCard data should be sent as part of the
BODY, not headers.

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


Mime
View raw message