Merge branch 'master' into python2
authorFredrik Tolf <fredrik@dolda2000.com>
Sun, 19 Mar 2017 20:00:54 +0000 (21:00 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Sun, 19 Mar 2017 20:00:54 +0000 (21:00 +0100)
Conflicts:
wrw/proto.py

1  2 
wrw/proto.py
wrw/sp/cons.py

diff --cc wrw/proto.py
@@@ -102,15 -103,15 +102,15 @@@ def simpleerror(env, startreq, code, ti
      return [buf]
  
  def urlq(url):
 -    if isinstance(url, str):
 +    if isinstance(url, unicode):
          url = url.encode("utf-8")
      ret = ""
-     invalid = ";&=#?/\"'"
 -    invalid = b"%;&=#?/\"'"
++    invalid = "%;&=#?/\"'"
      for c in url:
 -        if c in invalid or (c <= 32) or (c >= 128):
 -            ret += "%%%02X" % c
 +        if c in invalid or (ord(c) <= 32) or (ord(c) >= 128):
 +            ret += "%%%02X" % ord(c)
          else:
 -            ret += chr(c)
 +            ret += c
      return ret
  
  class urlerror(ValueError):
diff --cc wrw/sp/cons.py
Simple merge