Getting a URL form a "logged in" site

Dave Cragg dcragg at lacscentre.co.uk
Wed Dec 21 03:11:52 EST 2005


On 21 Dec 2005, at 02:38, Brian Yennie wrote:

> Dave & Dennis,
>
> Those headers you report are a redirect which probably needs to be  
> followed.
> What happens if you follow the URL indicated in the "Location"  
> field? That URL seems to indicate from it's name that is has  
> something to do with setting cookies.

You should follow Brian's suggestion. I haven't really followed all  
of this thread, sorry.

By the way, libUrl will automatically follow redirects if the  
original request is a GET, but won't follow them for POST requests.  
(This follows the http rfc spec.) I'm assuming your login request  
used POST.

To extract the Location url:

put libUrlLastRHHeaders() into tRHHeaders
put lineOffset("Location:", tRHHeaders) into tLocLine
if tLocLine > 0 then
   put word 2 to -1 of line tLocLine of tRHHeaders into tNewLoc
end if

Cheers
Dave




More information about the use-livecode mailing list