T
Thomas Kratz
I have a third party webserver that expects xml datasets to be uploaded
one per request (buggy concept, but not mine). The URL needs basic
authentication. If I understand the docs and sources of libwww correctly,
LWP::UserAgent is supposed to work like this:
The request method of the LWP::UserAgent object first sends a
simple_request without authentication. If the response indicates that
basic authorization is required and I supplied the object with
credentials, the request is passed to LWP::Authen::Basic::authenticate,
which will rerequest the URL with proper authentication information.
The problem is, that I will have to do a lot of requests and the webserver
chokes on the many unauthorized requests (non standard webserver, buggy
handling). Is there a possibility to skip the first request and let
LWP::Authen::Basic handle the request directly?
I could of cause inherit from LWP::UserAgent and roll my own request
method. But there could be somewhat more elegant.
TIA
Thomas
--
$/=$,,$_=<DATA>,s,(.*),$1,see;__END__
s,^(.*\043),,mg,@_=map{[split'']}split;{#>J~.>_an~>>e~......>r~
$_=$_[$%][$"];y,<~>^,-++-,?{$/=--$|?'"':#..u.t.^.o.P.r.>ha~.e..
'%',s,(.),\$$/$1=1,,$;=$_}:/\w/?{y,_, ,,#..>s^~ht<._..._..c....
print}:y,.,,||last,,,,,,$_=$;;eval,redo}#.....>.e.r^.>l^..>k^.-
one per request (buggy concept, but not mine). The URL needs basic
authentication. If I understand the docs and sources of libwww correctly,
LWP::UserAgent is supposed to work like this:
The request method of the LWP::UserAgent object first sends a
simple_request without authentication. If the response indicates that
basic authorization is required and I supplied the object with
credentials, the request is passed to LWP::Authen::Basic::authenticate,
which will rerequest the URL with proper authentication information.
The problem is, that I will have to do a lot of requests and the webserver
chokes on the many unauthorized requests (non standard webserver, buggy
handling). Is there a possibility to skip the first request and let
LWP::Authen::Basic handle the request directly?
I could of cause inherit from LWP::UserAgent and roll my own request
method. But there could be somewhat more elegant.
TIA
Thomas
--
$/=$,,$_=<DATA>,s,(.*),$1,see;__END__
s,^(.*\043),,mg,@_=map{[split'']}split;{#>J~.>_an~>>e~......>r~
$_=$_[$%][$"];y,<~>^,-++-,?{$/=--$|?'"':#..u.t.^.o.P.r.>ha~.e..
'%',s,(.),\$$/$1=1,,$;=$_}:/\w/?{y,_, ,,#..>s^~ht<._..._..c....
print}:y,.,,||last,,,,,,$_=$;;eval,redo}#.....>.e.r^.>l^..>k^.-