At Thu, 23 May 2002 22:20:13 +1200,
Holden Glova wrote:
> Interesting I was using req.path to get a similar value, which is preferred
> and why?
Hmm, That depends on purpose. req.path doesn't include query part of
the requested URI. In case of httpproxy, request_uri also has host
part. req.path is identical to
HTTPUtils::unescape(req.request_uri.path).
> Remember that if you want to use just the string representation of the URI
> make sure to do a req.request_uri.to_str and do not use req.request_uri.to_s
> because it yields a different result.
Really? WEBrick does "require 'uri'" and URI::Generic#to_s is defined
as follows in uri/generic.rb:
def to_s
to_str
end
-- Gotoken