[Webtest] Getting headers on a HTTP 302 redirect

Marc Guillemot webtest@lists.canoo.com
Fri, 23 Jun 2006 13:19:05 +0200


Hi Arnaud,

you can try to add following before your step 2:

<groovy>
step.context.webClient.redirectEnabled = false
</groovy>

Marc.

Arnaud Lesueur wrote:
> Hi,
> 
> My workflow is the following:
> 1. request a login form
> 2. post login/password to this login form
> 3. here I receive an HTTP 302 from the server
> 4. get the redirected URL
> 
> I would like to check information that I receive with the HTTP 302 such as the set-cookie also check that I really
> have a HTTP 302 as response status.
> 
> Is it possible to do this ?
> 
> Canoo follows the HTTP 302 redirect and when I'm trying to do a storeHeader, storeResponseCode and storeCookie Canoo
> returns the information from the step 4.
> 
> I've also tryed to use previousReponse but it return to step 1 in that case.
> 
> So my question is : How do I get header elements from the step 3 ?
> 
> 
> Any help would be greet,
> 
> 
> Arnaud Lesueur
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> 
>