in reply to Re: Forcing HTTP/1.0 and mangling headers
in thread Forcing HTTP/1.0 and mangling headers

Thanks, but there is no difference. At least it's still broken...
  • Comment on Re^2: Forcing HTTP/1.0 and mangling headers

Replies are listed 'Best First'.
Re^3: Forcing HTTP/1.0 and mangling headers
by jhourcle (Prior) on Jan 16, 2007 at 16:19 UTC

    'use' gets executed out of order. You'll either need to switch to 'require', place it in a BEGIN block, or set it before you run the script:

    $ perl -e 'use LWP; print LWP::Protocol::implementor("https"),"\n";' LWP::Protocol::https $ perl -e 'use LWP; $ENV{"PERL_LWP_USE_HTTP_10"}=1; print LWP::Protoco +l::implementor("https"),"\n";' LWP::Protocol::https $ perl -e '$ENV{"PERL_LWP_USE_HTTP_10"}=1; use LWP; print LWP::Protoco +l::implementor("https"),"\n";' LWP::Protocol::https $ perl -e '$ENV{"PERL_LWP_USE_HTTP_10"}=1; require 'LWP'; print LWP::P +rotocol::implementor("https"),"\n";' LWP::Protocol::https10 $ perl -e 'BEGIN { $ENV{"PERL_LWP_USE_HTTP_10"}=1; } use LWP; print LW +P::Protocol::implementor("https"),"\n";' LWP::Protocol::https10 $ export PERL_LWP_USE_HTTP_10=1; perl -e 'use LWP; print LWP::Protocol +::implementor("https"),"\n";' LWP::Protocol::https10
      I used a BEGIN block and that works. Thank you very much.

      Now, on to mangling the header...