Hi,
I am working on a program that has to emulate a browser, and log into the My UPS website. Everything was going fairly smoothly until one of the cookies it sent, contained an "&".
Specifically they send:
To send it back with my next page request, I parsed out the actual cookie value and did this:
'request_method' => 'POST',
'headers' => { Referer => 'https://www.ups.com/servlet/login?returnto=https://www.ups.com/ups.app/iss.class',
},
'cookies' => { test_ups_com => 'init',
session_ups_com => '1020736548&mycompany&0&YK5eYeY3By+w3SFqYlqm9FdH8KEEqnaJ'
},
'parameters' => {},
'agent_name' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)'
);
$http->fetch( $url );
And yes... as odd as it sounds... this is part of a Links SQL Plugin... so its using the GT library... So what happens here is it gets stuck... and it gives me a message saying I have to log in again.
To debug this... I did this post to my links install forcing an error, and it shows the second cookie as only being: 1020736548.... Cutting off at the &.
Obviously the & works when using the web browser.... however it seems that somewhere in one of the modules, the & cuts off the cookie before it gets sent out with the request headers.
Just in case... here is the version info on my URI::HTTPS module:
# Gossamer Threads Module Library
#
# GT::URI::HTTP
# Author : Aki Mimoto (support@gossamer-threads.com)
# CVS Info : 087,069,093,087,083
# $Id: HTTPS.pm,v 1.5 2001/02/11 01:11:24 aki Exp $
#
# Copyright (c) 2000 Gossamer Threads Inc. All Rights Reserved.
# ==================================================================
#
# Description:
# Gets HTTP data
#package GT::URI::HTTPS; Does anyone know if this is a bug in the GT package.... or how I can get around this?
Best regards,
AlexJ
I am working on a program that has to emulate a browser, and log into the My UPS website. Everything was going fairly smoothly until one of the cookies it sent, contained an "&".
Specifically they send:
Code:
session_ups_com=1020737632&mycompany&0&GMi+QdG9tEbLeLGzyfBNfTTzji7x80rp;domain=.ups.com;path=/Code:
my $http = new GT::URI::HTTPS( 'request_method' => 'POST',
'headers' => { Referer => 'https://www.ups.com/servlet/login?returnto=https://www.ups.com/ups.app/iss.class',
},
'cookies' => { test_ups_com => 'init',
session_ups_com => '1020736548&mycompany&0&YK5eYeY3By+w3SFqYlqm9FdH8KEEqnaJ'
},
'parameters' => {},
'agent_name' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)'
);
$http->fetch( $url );
And yes... as odd as it sounds... this is part of a Links SQL Plugin... so its using the GT library... So what happens here is it gets stuck... and it gives me a message saying I have to log in again.
To debug this... I did this post to my links install forcing an error, and it shows the second cookie as only being: 1020736548.... Cutting off at the &.
Obviously the & works when using the web browser.... however it seems that somewhere in one of the modules, the & cuts off the cookie before it gets sent out with the request headers.
Just in case... here is the version info on my URI::HTTPS module:
Code:
# ================================================================== # Gossamer Threads Module Library
#
# GT::URI::HTTP
# Author : Aki Mimoto (support@gossamer-threads.com)
# CVS Info : 087,069,093,087,083
# $Id: HTTPS.pm,v 1.5 2001/02/11 01:11:24 aki Exp $
#
# Copyright (c) 2000 Gossamer Threads Inc. All Rights Reserved.
# ==================================================================
#
# Description:
# Gets HTTP data
#package GT::URI::HTTPS;
Best regards,
AlexJ