equal
deleted
inserted
replaced
107 b"SimpleHTTPRequestHandler", |
107 b"SimpleHTTPRequestHandler", |
108 b"CGIHTTPRequestHandler", |
108 b"CGIHTTPRequestHandler", |
109 ), |
109 ), |
110 ) |
110 ) |
111 |
111 |
|
112 |
112 # urllib.parse.quote() accepts both str and bytes, decodes bytes |
113 # urllib.parse.quote() accepts both str and bytes, decodes bytes |
113 # (if necessary), and returns str. This is wonky. We provide a custom |
114 # (if necessary), and returns str. This is wonky. We provide a custom |
114 # implementation that only accepts bytes and emits bytes. |
115 # implementation that only accepts bytes and emits bytes. |
115 def quote(s, safe='/'): |
116 def quote(s, safe='/'): |
116 # bytestr has an __iter__ that emits characters. quote_from_bytes() |
117 # bytestr has an __iter__ that emits characters. quote_from_bytes() |