Permalink
Browse files

Merge pull request #110 from databus23/patch-1

Allow leading dots in no_proxy entries
  • Loading branch information...
nahi committed Sep 22, 2012
2 parents ddc5403 + e2bf6a0 commit b4572a1e5af7de29ae7600454577fa1e6e52b3cf
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/httpclient.rb
View
@@ -1045,7 +1045,7 @@ def no_proxy?(uri)
return false
end
@no_proxy.scan(/([^:,]+)(?::(\d+))?/) do |host, port|
- if /(\A|\.)#{Regexp.quote(host)}\z/i =~ uri.host &&
+ if /(\A|\.)#{Regexp.quote(host.gsub(/^\./,''))}\z/i =~ uri.host &&
(!port || uri.port == port.to_i)
return true
end

0 comments on commit b4572a1

Please sign in to comment.