Of course! Works great know. Thanks for your help.
sebb wrote:
On Fri, 17 Dec 2004 22:04:13 +0100, Anders Haal <[EMAIL PROTECTED]> wrote:

Have a situation when I need to use a regular expression post operation
on the header response on page returning 302. The HTTP response headers
is the below and I like to extract the viewid from the Location row. My
regular expression is  Location.*_viewid_=(.+)&_.* and it seems to work
using the excelent tool JRegexpTester developed by Alain Cabon for
testing, http://jregexptester.sourceforge.net. Should this work or will
the the post operation regular expresion only work the redirected page?


You can switch off the automatic following of redirects, in which case
the 302 will be handled as a normal page fetch, to which you can apply
the regex.

You'll then need to fetch the target of the redirect explicitly.


HTTP/1.1 302 Found
Date: Fri, 17 Dec 2004 20:50:12 GMT
Server: Apache/1.3.3 (Unix)
Vgn_original_uri: /page/1,4456,D4639C5B365C193E25AA53CD390FC2D9,00.html
Set-Cookie: booking_sessionid=D4639C5B365C193E25AA53CD390FC2D9; path=/
Expires: Tue, 20 Jun 1995 04:13:09 GMT
Pragma: no-cache
Cache-Control: no-cache
Location:
page/1,4456,D4639C5B365C193E25AA53CD390FC2D9,00.html?_viewid_=430607_1103316612157&_refresh_=refresh&app=booking
Keep-Alive: timeout=15, max=97
Connection: Keep-Alive
Content-Type: text/html
--

+46 70 575 35 46
[EMAIL PROTECTED]
www.ingby.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--

+46 70 575 35 46
[EMAIL PROTECTED]
www.ingby.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to