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 Rainer Jung <ra...@kippdata.de> on 2010/01/19 11:24:42 UTC

AjpSampler, Cookies, optional filtering

Hi Sebb,

further testing reveals a related problem between AjpSampler and cookies.

The AjpSampler always sends all cookies. It does not go through the 
match() functionality of the CookieSpec.

One can argue whether that's good or not, because the AjpSampler doesn't 
allow to configure the additional AJP13 data, like name of the reverse 
proxy etc.

Unfortunately with my patch applied, we now use 
getCookieHeaderForURL(url) (only the matching cookies) to add the data 
for the GUI view of the cookies in the request, but getCookies() (all 
cookies) for actually adding them to the AJP13 packets.

The CookieManager doesn't allow an unfiltered getCookiesHeader() nor 
does it allow a raw getCookiesForURL().

Which way should we go? Use "all" for both data or "filtered" for both? 
If we decide upon that, I can write the patch.

Further reasoning for HTTP as well as AJP:

The CookieSpec is used for two purposes. It does parsing and formatting, 
and it also does validate() and match(). The property CHECK_COOKIES 
allows to not do the validate(). I think it would be nice to use 
CHECK_COOKIES also to disable the match() call against the spec and 
instead use all cookies.

One situation where this is useful, is when you need to test against IP 
addresses, but your servers return cookies with actual domain set. 
Another situation is when you test against the individual nodes of a 
farm, but the servers returns cookies matching the load balancer.

Finally this would also help to decide the above question about the 
AjpSampler. It would be effectvely configurable, whether to filter or not.

It would be a nice addition to add that as a checkbox in the cooki 
manager gui.

What do you think? If you like the idea I can provide patches.

Regards,

Rainer


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


Re: AjpSampler, Cookies, optional filtering

Posted by sebb <se...@gmail.com>.
On 19/01/2010, Rainer Jung <ra...@kippdata.de> wrote:
> Hi Sebb,
>
>  further testing reveals a related problem between AjpSampler and cookies.
>
>  The AjpSampler always sends all cookies. It does not go through the match()
> functionality of the CookieSpec.
>
>  One can argue whether that's good or not, because the AjpSampler doesn't
> allow to configure the additional AJP13 data, like name of the reverse proxy
> etc.
>
>  Unfortunately with my patch applied, we now use getCookieHeaderForURL(url)
> (only the matching cookies) to add the data for the GUI view of the cookies
> in the request, but getCookies() (all cookies) for actually adding them to
> the AJP13 packets.
>
>  The CookieManager doesn't allow an unfiltered getCookiesHeader() nor does
> it allow a raw getCookiesForURL().
>
>  Which way should we go? Use "all" for both data or "filtered" for both? If
> we decide upon that, I can write the patch.
>
>  Further reasoning for HTTP as well as AJP:
>
>  The CookieSpec is used for two purposes. It does parsing and formatting,
> and it also does validate() and match(). The property CHECK_COOKIES allows
> to not do the validate(). I think it would be nice to use CHECK_COOKIES also
> to disable the match() call against the spec and instead use all cookies.

I don't like the idea of changing the behaviour; however a new
property would OK.

>  One situation where this is useful, is when you need to test against IP
> addresses, but your servers return cookies with actual domain set. Another
> situation is when you test against the individual nodes of a farm, but the
> servers returns cookies matching the load balancer.

OK.

>  Finally this would also help to decide the above question about the
> AjpSampler. It would be effectvely configurable, whether to filter or not.
>
>  It would be a nice addition to add that as a checkbox in the cooki manager
> gui.

If the GUI is amended, I think one should add two checkboxes - 1 for
validation and the other for matching.

As regards IP address matching for cookies, it might be worth
considering an optional host file name on the GUI. This might also
work for the load-balancer case, if the file syntax supported aliases.
I.e. the target host id, either IP or name would be looked up in the
host list as part of the matching process. Not sure how easy that
would be.

>  What do you think? If you like the idea I can provide patches.

I think the idea is good.

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

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