Skip to content

Commit

Permalink
Fix to encode usernames and passwords with special characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Harkins committed Sep 26, 2009
1 parent a48d509 commit 3614245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tweetstream/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def start(path, query_parameters = {}, &block) #:nodoc:
protected

def build_uri(path, query_parameters = {}) #:nodoc:
URI.parse("http://#{self.username}:#{self.password}@stream.twitter.com/1/#{path}.json#{build_query_parameters(query_parameters)}")
URI.parse("http://#{URI.encode self.username}:#{URI.encode self.password}@stream.twitter.com/1/#{path}.json#{build_query_parameters(query_parameters)}")
end

def build_query_parameters(query) #:nodoc:
Expand Down

0 comments on commit 3614245

Please sign in to comment.