Hi,

I'm using WebTest to test a web application and I have a problem. Not sure
if it's a bug in webtest itself or some special configuration should be
used.

I'm watching the cookies that are received by webtest. I expect a cookie
like this:

CTMBR=29990,Test,Van Auken,opNonElite,CPP

but webtest parses multiple cookies instead like

Cookie accepted: "CTMBR=29990"
Cookie accepted: "Test="
Cookie accepted: "Van Auken="
Cookie accepted: "opNonElite="
Cookie accepted: "CPP="

It seems that webtest interprets comma (",") as a separator among multiple
cookies.

I've read most of the posts in the mailing list and didn't find something to
solve my problem. I tried all the cookie policies: BROWSER_COMPATIBILITY,
NETSCAPE, RFC_2109, and RFC_2965. Changing cookie policy didn't make any
difference.

I configured the cookie policy using a groovy step found in the mailing
list:

            <groovy description="Change cookie policy to:
BROWSER_COMPATIBILITY">
              import org.apache.commons.httpclient.cookie.CookiePolicy
              import org.apache.commons.httpclient.params.*


((HttpClientParams)DefaultHttpParams.getDefaultParams()).setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
            </groovy>

Any help would be highly appreciated.

Thanks a lot,
Mircea

Reply via email to