Re: LWP cookies
From: Richard Bell (rbell01824_at_comcast.net)
Date: 03/29/04
- Next message: Hemant Shah: "Re: Cannot reset LIBPATH in perl program on AIX"
- Previous message: Tad McClellan: "Re: File handling concatenating two files"
- In reply to: Alan J. Flavell: "Re: LWP cookies"
- Next in thread: Uri Guttman: "Re: LWP cookies"
- Reply: Uri Guttman: "Re: LWP cookies"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 28 Mar 2004 23:12:16 GMT
Alan J. Flavell wrote:
> On Sun, 28 Mar 2004, Richard Bell wrote:
>
>
>>As to the headers cookies et al. They are the result of what I would
>>get if I actually visited 18 pages of forms in turn to build the query I
>>post. Moreover, the server is VERY picky about what it will dance with.
>
>
> If it works with a browser, I'm not sure why it wouldn't work with
> LWP. The theory is that you just have to call it in the right way
> (unless the server is misbehaving - in which case you're on entirely
> the wrong group for discussing WWW server problems).
In the course of this dance, I neglected to mention that the 18 previous
pages use frames and very heavy scripting (some Java, some VB). While
I'm new to LWP and don't really know, I'm under the impression that
frames and LWP don't get on well, to say nothing of the scripts. That
aside, the code to visit all 18 pages would ultimately be IMHO rather
worse than the mess with the headers. But that is, of course, just my
preference.
>
>
>> In deference to reality I just send them all along.
>
>
> If they're in scope for the request, and they're in the cookie jar
> already, the module should know what to do with them. Duplicating
> that function does indeed look like re-inventing the wheel, and the
> code was anything -but- aesthetic - which is often a warning sign.[1]
>
The point is interesting. I could, as you seem to suggest, force the
values into the cookie jar and let LWP do a bit more work. It turns out
that the only real benefit here would be to allow LWP to set the content
length
$req18->header('Content-Length' => '384');
and of course, remove my concern about the session cookie (I'm still not
entirely sure which it is)
Still, I'm not sure IMHO that going to the trouble to dump the cookies
into the jar is worth the return (this is, after all, a perl hack).
Still it's a thought.
>
>>It is worth noting that many of the cookies hold the context
>>associated with what would happen if I in fact visited all 18 pages
>>(so they are in that sense necessary for the POST to work, hardly,
>>as you mentioned, wheel invention).
>
>
> But surely the point is that you want to present the POST request 'as
> if' you had visited those pages - and that's done by pre-loading the
> cookie jar with the appropriate cookies.
>
> good luck
>
> [1] even if, speaking as a physicist, I can "write FORTRAN in any
> language" ;-)
To each his own. My real concern, however, remains concerning a cookie
value forced in the header v. one in the cookie jar as it concerns the
session cookie. It's working, I'm OK with it, but I'd like to be a bit
more sure if anyone knows the underlying behavior of LWP in this case.
Thanks for your interest.
R
- Next message: Hemant Shah: "Re: Cannot reset LIBPATH in perl program on AIX"
- Previous message: Tad McClellan: "Re: File handling concatenating two files"
- In reply to: Alan J. Flavell: "Re: LWP cookies"
- Next in thread: Uri Guttman: "Re: LWP cookies"
- Reply: Uri Guttman: "Re: LWP cookies"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|