You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Archie Cowan <ar...@gmail.com> on 2011/11/11 17:55:20 UTC

Duplicate Cookie Header in Requests

Hello JMeter Users,

I am currently attempting to use jmeter with an application that is
sensitive to the number of Cookie headers in requests. Somehow, my Jmeter
test is sending a second Cookie header and this causes the application
under test to fail.

According to RFC 6265 (http://tools.ietf.org/html/rfc6265#section-5.4):

"When the user agent generates an HTTP request, the user agent MUST NOT
attach more than one Cookie header field."

Can I eliminate this behavior in jmeter? My test is using HttpClient4 for
requests and the "compatibility" mode on the Cookie Manager. I appreciate
any help you can provide!

Regards,

Archie

Re: Duplicate Cookie Header in Requests

Posted by David Luu <ma...@gmail.com>.
You recorded new test, and on Linux. Was original test also recorded via
JMeter HTTP Proxy server and the recording controller? If yes, what browser
was used to do the recording as well?

Just wondering if the issue is kind of related to this article post:

http://blog.netnerds.net/2006/04/asp-sustain-remote-cookie-sessions-in-an-asp-script-using-vbscript/

where if you read the code snippet, to make HTTP request with cookie
session state support work through Microsoft (XmlHttpRequest object or
perhaps even IE browser) had to set an extra cookie.

On Sun, Nov 13, 2011 at 11:04 AM, Archie Cowan <ar...@gmail.com>wrote:

> Hi Shmuel,
>
> Thanks for responding. We recorded a new test from another machine (Linux
> rather than Windows) and that resolved the duplicate cookie header issue.
> We haven't had a chance to dig deeper. I presume we should see something
> different in the jmx files created by the proxy since the new file now
> works anywhere we run it. Perhaps tomorrow we'll have that identified.
>
> The site will be available on the Internet later this week. Maybe at that
> point we share the test if we haven't figured it out.
>
> Cheers
>
> On Sun, Nov 13, 2011 at 1:15 PM, Shmuel Krakower <sh...@gmail.com>
> wrote:
>
> > Hi Archie,
> > I never met this problem.
> > Make sure you don't override JMeter -p parameter file (thus making the
> > jmeter.properties file not relevant).
> >
> > Is this public facing website where I can re-create this behavior?
> >
> > Shmuel.
> >
> >
> > On Fri, Nov 11, 2011 at 7:40 PM, Archie Cowan <archie.cowan@gmail.com
> > >wrote:
> >
> > > Thanks for the suggestion, but, unfortunately, that didn't appear to do
> > the
> > > trick. I uncommented the hc.parameters.file=hc.parameters line in
> > > jmeter.properties and updated hc.parameters. We've also tried each of
> the
> > > different http client modes (java, hc 3.1, hc4). Still, we send
> requests
> > > with two Cookie headers.
> > >
> > > I also tried removing the $Boolean, just to verify that the file is
> used,
> > > which made jmeter throw a classcast error. So I know the file is read
> by
> > > the application.
> > >
> > > Any other ideas?
> > >
> > > On Fri, Nov 11, 2011 at 12:08 PM, sebb <se...@gmail.com> wrote:
> > >
> > > > On 11 November 2011 16:55, Archie Cowan <ar...@gmail.com>
> > wrote:
> > > > > Hello JMeter Users,
> > > > >
> > > > > I am currently attempting to use jmeter with an application that is
> > > > > sensitive to the number of Cookie headers in requests. Somehow, my
> > > Jmeter
> > > > > test is sending a second Cookie header and this causes the
> > application
> > > > > under test to fail.
> > > > >
> > > > > According to RFC 6265 (
> > http://tools.ietf.org/html/rfc6265#section-5.4
> > > ):
> > > > >
> > > > > "When the user agent generates an HTTP request, the user agent MUST
> > NOT
> > > > > attach more than one Cookie header field."
> > > > >
> > > > > Can I eliminate this behavior in jmeter? My test is using
> HttpClient4
> > > for
> > > > > requests and the "compatibility" mode on the Cookie Manager. I
> > > appreciate
> > > > > any help you can provide!
> > > >
> > > > As far as I can tell, HC4 should only use multiple cookie headers for
> > > > RFC 2109/2965 cookies.
> > > >
> > > > Should not make any difference, but you could try updating
> > > > hc.parameters to add the following property:
> > > >
> > > > http.protocol.single-cookie-header$Boolean=true
> > > >
> > > > Remember to enable the hc.parameters file.
> > > >
> > > > Let us know if that works or not.
> > > >
> > > > > Regards,
> > > > >
> > > > > Archie
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > >
> > > >
> > >
> >
>

Re: Duplicate Cookie Header in Requests

Posted by Archie Cowan <ar...@gmail.com>.
Hi Shmuel,

Thanks for responding. We recorded a new test from another machine (Linux
rather than Windows) and that resolved the duplicate cookie header issue.
We haven't had a chance to dig deeper. I presume we should see something
different in the jmx files created by the proxy since the new file now
works anywhere we run it. Perhaps tomorrow we'll have that identified.

The site will be available on the Internet later this week. Maybe at that
point we share the test if we haven't figured it out.

Cheers

On Sun, Nov 13, 2011 at 1:15 PM, Shmuel Krakower <sh...@gmail.com> wrote:

> Hi Archie,
> I never met this problem.
> Make sure you don't override JMeter -p parameter file (thus making the
> jmeter.properties file not relevant).
>
> Is this public facing website where I can re-create this behavior?
>
> Shmuel.
>
>
> On Fri, Nov 11, 2011 at 7:40 PM, Archie Cowan <archie.cowan@gmail.com
> >wrote:
>
> > Thanks for the suggestion, but, unfortunately, that didn't appear to do
> the
> > trick. I uncommented the hc.parameters.file=hc.parameters line in
> > jmeter.properties and updated hc.parameters. We've also tried each of the
> > different http client modes (java, hc 3.1, hc4). Still, we send requests
> > with two Cookie headers.
> >
> > I also tried removing the $Boolean, just to verify that the file is used,
> > which made jmeter throw a classcast error. So I know the file is read by
> > the application.
> >
> > Any other ideas?
> >
> > On Fri, Nov 11, 2011 at 12:08 PM, sebb <se...@gmail.com> wrote:
> >
> > > On 11 November 2011 16:55, Archie Cowan <ar...@gmail.com>
> wrote:
> > > > Hello JMeter Users,
> > > >
> > > > I am currently attempting to use jmeter with an application that is
> > > > sensitive to the number of Cookie headers in requests. Somehow, my
> > Jmeter
> > > > test is sending a second Cookie header and this causes the
> application
> > > > under test to fail.
> > > >
> > > > According to RFC 6265 (
> http://tools.ietf.org/html/rfc6265#section-5.4
> > ):
> > > >
> > > > "When the user agent generates an HTTP request, the user agent MUST
> NOT
> > > > attach more than one Cookie header field."
> > > >
> > > > Can I eliminate this behavior in jmeter? My test is using HttpClient4
> > for
> > > > requests and the "compatibility" mode on the Cookie Manager. I
> > appreciate
> > > > any help you can provide!
> > >
> > > As far as I can tell, HC4 should only use multiple cookie headers for
> > > RFC 2109/2965 cookies.
> > >
> > > Should not make any difference, but you could try updating
> > > hc.parameters to add the following property:
> > >
> > > http.protocol.single-cookie-header$Boolean=true
> > >
> > > Remember to enable the hc.parameters file.
> > >
> > > Let us know if that works or not.
> > >
> > > > Regards,
> > > >
> > > > Archie
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> > >
> > >
> >
>

Re: Duplicate Cookie Header in Requests

Posted by Shmuel Krakower <sh...@gmail.com>.
Hi Archie,
I never met this problem.
Make sure you don't override JMeter -p parameter file (thus making the
jmeter.properties file not relevant).

Is this public facing website where I can re-create this behavior?

Shmuel.


On Fri, Nov 11, 2011 at 7:40 PM, Archie Cowan <ar...@gmail.com>wrote:

> Thanks for the suggestion, but, unfortunately, that didn't appear to do the
> trick. I uncommented the hc.parameters.file=hc.parameters line in
> jmeter.properties and updated hc.parameters. We've also tried each of the
> different http client modes (java, hc 3.1, hc4). Still, we send requests
> with two Cookie headers.
>
> I also tried removing the $Boolean, just to verify that the file is used,
> which made jmeter throw a classcast error. So I know the file is read by
> the application.
>
> Any other ideas?
>
> On Fri, Nov 11, 2011 at 12:08 PM, sebb <se...@gmail.com> wrote:
>
> > On 11 November 2011 16:55, Archie Cowan <ar...@gmail.com> wrote:
> > > Hello JMeter Users,
> > >
> > > I am currently attempting to use jmeter with an application that is
> > > sensitive to the number of Cookie headers in requests. Somehow, my
> Jmeter
> > > test is sending a second Cookie header and this causes the application
> > > under test to fail.
> > >
> > > According to RFC 6265 (http://tools.ietf.org/html/rfc6265#section-5.4
> ):
> > >
> > > "When the user agent generates an HTTP request, the user agent MUST NOT
> > > attach more than one Cookie header field."
> > >
> > > Can I eliminate this behavior in jmeter? My test is using HttpClient4
> for
> > > requests and the "compatibility" mode on the Cookie Manager. I
> appreciate
> > > any help you can provide!
> >
> > As far as I can tell, HC4 should only use multiple cookie headers for
> > RFC 2109/2965 cookies.
> >
> > Should not make any difference, but you could try updating
> > hc.parameters to add the following property:
> >
> > http.protocol.single-cookie-header$Boolean=true
> >
> > Remember to enable the hc.parameters file.
> >
> > Let us know if that works or not.
> >
> > > Regards,
> > >
> > > Archie
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
> >
>

Re: Duplicate Cookie Header in Requests

Posted by Archie Cowan <ar...@gmail.com>.
Thanks for the suggestion, but, unfortunately, that didn't appear to do the
trick. I uncommented the hc.parameters.file=hc.parameters line in
jmeter.properties and updated hc.parameters. We've also tried each of the
different http client modes (java, hc 3.1, hc4). Still, we send requests
with two Cookie headers.

I also tried removing the $Boolean, just to verify that the file is used,
which made jmeter throw a classcast error. So I know the file is read by
the application.

Any other ideas?

On Fri, Nov 11, 2011 at 12:08 PM, sebb <se...@gmail.com> wrote:

> On 11 November 2011 16:55, Archie Cowan <ar...@gmail.com> wrote:
> > Hello JMeter Users,
> >
> > I am currently attempting to use jmeter with an application that is
> > sensitive to the number of Cookie headers in requests. Somehow, my Jmeter
> > test is sending a second Cookie header and this causes the application
> > under test to fail.
> >
> > According to RFC 6265 (http://tools.ietf.org/html/rfc6265#section-5.4):
> >
> > "When the user agent generates an HTTP request, the user agent MUST NOT
> > attach more than one Cookie header field."
> >
> > Can I eliminate this behavior in jmeter? My test is using HttpClient4 for
> > requests and the "compatibility" mode on the Cookie Manager. I appreciate
> > any help you can provide!
>
> As far as I can tell, HC4 should only use multiple cookie headers for
> RFC 2109/2965 cookies.
>
> Should not make any difference, but you could try updating
> hc.parameters to add the following property:
>
> http.protocol.single-cookie-header$Boolean=true
>
> Remember to enable the hc.parameters file.
>
> Let us know if that works or not.
>
> > Regards,
> >
> > Archie
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: Duplicate Cookie Header in Requests

Posted by sebb <se...@gmail.com>.
On 11 November 2011 16:55, Archie Cowan <ar...@gmail.com> wrote:
> Hello JMeter Users,
>
> I am currently attempting to use jmeter with an application that is
> sensitive to the number of Cookie headers in requests. Somehow, my Jmeter
> test is sending a second Cookie header and this causes the application
> under test to fail.
>
> According to RFC 6265 (http://tools.ietf.org/html/rfc6265#section-5.4):
>
> "When the user agent generates an HTTP request, the user agent MUST NOT
> attach more than one Cookie header field."
>
> Can I eliminate this behavior in jmeter? My test is using HttpClient4 for
> requests and the "compatibility" mode on the Cookie Manager. I appreciate
> any help you can provide!

As far as I can tell, HC4 should only use multiple cookie headers for
RFC 2109/2965 cookies.

Should not make any difference, but you could try updating
hc.parameters to add the following property:

http.protocol.single-cookie-header$Boolean=true

Remember to enable the hc.parameters file.

Let us know if that works or not.

> Regards,
>
> Archie
>

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