Skip to content

Commit

Permalink
Binary/Unicode confusion.
Browse files Browse the repository at this point in the history
  • Loading branch information
amcgregor committed Aug 24, 2023
1 parent 3dee431 commit 537600d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion uri/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ def __len__(self):

def __str__(self):
# Certain symbols are explicitly allowed, ref: http://pretty-rfc.herokuapp.com/RFC3986#query
iterator = (quote_plus(i.encode('utf8')).replace('%3F', '?').replace('%2F', '/') for i in self) if self.valid else self
iterator = (quote_plus(i.encode('utf8')).replace(b'%3F', b'?').replace(b'%2F', b'/') for i in self) if self.valid else self
return self.sep.join(iterator)

0 comments on commit 537600d

Please sign in to comment.