[Chicago-talk] How/where does www::mech re-evaluate a response and do the right thing?

Jay Strauss me at heyjay.com
Thu Feb 17 04:27:54 PST 2005


Hi (maybe Andy will respond),

If I get back a response object that looks like the below.  By what 
mechanism do I use the header and cookie to download the file?  What I 
mean is, am I suppose take that header put it into some other type of 
HTTP or LWP object and do a request on it?

I'm trying to figure out how www::mech just does the right thing and 
just serves up the content

Thanks
Jay

$VAR1 = bless( {
                  '_protocol' => 'HTTP/1.1',
                  '_content' => '<html><head><title>Object 
moved</title></head><body>^M
<h2>Object moved to <a href=\'/DelayedQuote/QuoteData.dat\'>here</a>.</h2>^M
</body></html>^M
',
                  '_rc' => '302',
                  '_headers' => bless( {
                                         'client-response-num' => 1,
                                         'cache-control' => 'private',
                                         'set-cookie' => [
 
'CBOESiteTrackingID=88f8300a-e989-4f5b-aafd-99ba123870c1; expires=Tue, 
17-Feb-2105 12:25:47 GMT; path=/',
 
'WEBTRENDS_ID=; expires=Wed, 16-Feb-2005 12:25:47 GMT; path=/',
 
'DownLoadError=; expires=Wed, 16-Feb-2005 12:25:47 GMT; path=/',
 
'QueryData=06C38A2F1465BF909C384E3F185DD721EE116829700B819C9D36C67EC20BB9A965700C969F77344BC081C467639F2FB71BCE63C1E41FAA2B5F87065CFE9F1CA8EC2ACD76B5F588B08DD89F3EF32EEC76410C8314C5B9825E; 
path=/'
                                                         ],
                                         'location' => 
'/DelayedQuote/QuoteData.dat',
                                         'date' => 'Thu, 17 Feb 2005 
12:25:47 GMT',
                                         'client-peer' => 
'198.160.148.116:80',
                                         'content-length' => '144',
                                         'x-aspnet-version' => '1.1.4322',
                                         'client-date' => 'Thu, 17 Feb 
2005 12:22:48 GMT',
                                         'content-type' => 'text/html; 
charset=iso-8859-1',
                                         'title' => 'Object moved',
                                         'server' => 'Microsoft-IIS/6.0'
                                       }, 'HTTP::Headers' ),
                  '_msg' => 'Found',
                  '_request' => bless( {
                                         '_content' => 
'__EVENTTARGET=&__EVENTARGUMENT=&NOVIEWSTATE=dDwtODc5MTM4MTUwOzs%2B6wDeQv0gEC342sUPKG%2B3n6ZStJ8%3D&ucHeader%3AucCBOEHeaderLinks%3AucCBOEHeaderSearch%3Asearchtext=&txtTicker=QQQQ&cmdSubmit=Download',
                                         '_uri' => bless( do{\(my $o = 
'http://www.cboe.com/DelayedQuote/QuoteTableDownload.aspx')}, 'URI::http' ),
                                         '_headers' => bless( {
 
'user-agent' => 'Windows IE 6',
 
'content-type' => 'application/x-www-form-urlencoded',
 
'content-length' => 196
                                                              }, 
'HTTP::Headers' ),
                                         '_method' => 'POST'
                                       }, 'HTTP::Request' )
                }, 'HTTP::Response' );



More information about the Chicago-talk mailing list