Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #119 from guapolo/master

Changed username/password validation regexp so you can use a blank username
  • Loading branch information...
commit 2dc6872ae37ec5d329dc810cc1a47cc72142c2cd 2 parents 1cff341 + 83c9aaa
@jnunemaker authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 bin/httparty
View
4 bin/httparty
@@ -49,7 +49,7 @@ OptionParser.new do |o|
end
o.on("-u", "--user [CREDS]", "Use basic authentication. Value should be user:password") do |u|
- abort "Invalid credentials format. Must be user:password" unless u =~ /.+:.+/
+ abort "Invalid credentials format. Must be user:password" unless u =~ /.*:.+/
user, password = u.split(':')
opts[:basic_auth] = { :username => user, :password => password }
end
@@ -110,4 +110,4 @@ else
puts response
end
end
-exit false if opts[:response_code] && response.code >= 400
+exit false if opts[:response_code] && response.code >= 400
Please sign in to comment.
Something went wrong with that request. Please try again.