LWP::Request technical question?

A

at

Perlites:

I have a perl program that uses LWP to access an https site. It was
working but a few weeks ago stopped. The remote server is complaining
that my request format is incorrect.

My code section looks like this:

$REQ= POST 'https://www.blah.com',
[ NETCONNECT_TRANSACTION => $DATA ];
$REQ->authorization_basic($USERID,$PASSWD);

$RSP=$UA->request($REQ);

When I print the $REQ as_string it shows the following:

POST https://www.blah.com/netconnect2_0Demo/servlets/NetConnectServlet
Authorization: Basic ZmluZGUGF0Y286SjVsMjEwbW4XYZO=
Content-Length: 2496
Content-Type: application/x-www-form-urlencoded

NETCONNECT_TRANSACTION=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8
%22%3F%3E%3CNetConnectRequest+xmlns%3D%22http%3A%2F%2Fwww.blah.com%2FNetConnect%22xmlns%3A
.... etc ...


The webmaster at the remote server is stating that the reason for the
failure is that I DO NOT HAVE an '&' preceeding the
"NETCONNECT_TRANSACTION=" in my request.

So, my question is:

If the request is a POST then is the Ampersand required or automatic?

If it does belong there then what can be done to assure that the
request format is correct (i.e.: proper url_encoding)?

Please advise anyone???

Thanks

B
 
G

gnari

Perlites:

I have a perl program that uses LWP to access an https site. It was
working but a few weeks ago stopped. The remote server is complaining
that my request format is incorrect.

My code section looks like this:

$REQ= POST 'https://www.blah.com',
[ NETCONNECT_TRANSACTION => $DATA ];
$REQ->authorization_basic($USERID,$PASSWD);

$RSP=$UA->request($REQ);

When I print the $REQ as_string it shows the following:

POST https://www.blah.com/netconnect2_0Demo/servlets/NetConnectServlet
Authorization: Basic ZmluZGUGF0Y286SjVsMjEwbW4XYZO=
Content-Length: 2496
Content-Type: application/x-www-form-urlencoded

NETCONNECT_TRANSACTION=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8
%22%3F%3E%3CNetConnectRequest+xmlns%3D%22http%3A%2F%2Fwww.blah.com%2FNetConn
ect%22xmlns%3A
... etc ...


The webmaster at the remote server is stating that the reason for the
failure is that I DO NOT HAVE an '&' preceeding the
"NETCONNECT_TRANSACTION=" in my request.

this is nonsense.

what is the exact error message you get.
maybe the error is in the XML you are posting.

gnari
 
B

Brian McCauley

gnari said:
this is nonsense.

If the webmaster is admitting that there's a bug in his server I would
not be inclined to dismiss it as "nonsense" without some futher
evidence.

--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top