Re: 501 return code

"Scott T. Hildreth" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
On Fri, 2005-08-19 at 16:49 -0500, Scott T. Hildreth wrote:
> I have code that posts xml data to a http server (Tomcat).
> Which works perfectly with perl 5.6.2, not with perl 5.8.?.
> For a work around I have 5.6.2 installed and running the code, but
> now I would like to figure out why this is not working with Perl 5.8 .
> When I send the request, I get-
> 
>   DB<3> x $res
> 0  HTTP::Response=HASH(0x89a7f78)
>    '_content' => "501 Protocol scheme '\cG\c@\cH\c@' is not supported\cJ"

  Well, this happened again, I get 'nulls' (as posted originally) or I got this 
  msg today, dumping the response object :

'_content' => '501 Protocol scheme \'\' is not supported

  I traced this down to URI.pm, the _scheme method, 

  151:        unless (@_) {
  152==>b         return unless $$self =~ /^($scheme_re):/o;
  153:            return $1;
  154         }
 
  I print to see $scheme_re =  '[a-zA-Z][a-zA-Z0-9.+\\-]*'

    DB<39> p $$self =~ /^($scheme_re):/o;
    http

  ...so the regex is working, yet $1 is not captured

  153:            return $1;
    DB<40> x $1
    0 (basically not printable chars)

    ...and here is a dump of $$self,

    DB<41> x $$self
    0  'http://192.168.1.100:8080/OTools/Dispatcher'

    
..I'm at a loss, does anyone have any ideas why this is happening?

                               Thanks.

> 
> ..like I stated earlier, this works with 5.6.2.  I am not sure what has 
> changed with Perl 5.8.* and what I need to do different.  Any ideas?
> 
> 
>                                  Thanks,
>                                      STH
-- 
Scott T. Hildreth <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.