Does this not affect existing tests?

On Jul 2, 2009, at 2:51 AM, Christian Hofstaedtler wrote:

>
> Earlier ruby 1.8 versions do not have start_with? for Strings.
> Found by John Barbuto.
> ---
> lib/puppet/network/http/rack.rb |    3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/lib/puppet/network/http/rack.rb b/lib/puppet/network/ 
> http/rack.rb
> index 6eab27a..756b668 100644
> --- a/lib/puppet/network/http/rack.rb
> +++ b/lib/puppet/network/http/rack.rb
> @@ -15,6 +15,7 @@ class Puppet::Network::HTTP::Rack
>         protocols.delete :rest
>
>         # Prepare the XMLRPC handler, for backward compatibility (if  
> requested)
> +        @xmlrpc_path = '/RPC2'
>         if args[:protocols].include?(:xmlrpc)
>             raise ArgumentError, "XMLRPC was requested, but no  
> handlers were given" if !args.include?(:xmlrpc_handlers)
>
> @@ -36,7 +37,7 @@ class Puppet::Network::HTTP::Rack
>         Puppet.debug 'Handling request: %s %s' %  
> [request.request_method, request.fullpath]
>
>         # if we shall serve XMLRPC, have /RPC2 go to the xmlrpc  
> handler
> -        if @xmlrpc_http_handler and request.path_info.start_with?('/ 
> RPC2')
> +        if @xmlrpc_http_handler and @xmlrpc_path ==  
> request.path_info[0, @xmlrpc_path.size]
>             handler = @xmlrpc_http_handler
>         else
>             # everything else is handled by the new REST handler
> -- 
> 1.5.6.5
>
>
> >


-- 
I am a kind of paranoiac in reverse. I suspect people of plotting
to make me happy. --J. D. Salinger
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to