Merge branch 'master' into python3
authorFredrik Tolf <fredrik@dolda2000.com>
Tue, 4 Jun 2013 13:24:01 +0000 (15:24 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Tue, 4 Jun 2013 13:24:01 +0000 (15:24 +0200)
Conflicts:
wrw/util.py

1  2 
wrw/dispatch.py
wrw/resp.py
wrw/util.py

diff --cc wrw/dispatch.py
Simple merge
diff --cc wrw/resp.py
Simple merge
diff --cc wrw/util.py
@@@ -1,20 -1,12 +1,21 @@@
- import inspect
- from . import req, dispatch, session, form, resp
+ import inspect, math
 -import req, dispatch, session, form, resp, proto
++from . import req, dispatch, session, form, resp, proto
  
  def wsgiwrap(callable):
      def wrapper(env, startreq):
          return dispatch.handleenv(env, startreq, callable)
+     wrapper.__wrapped__ = callable
      return wrapper
  
 +def stringwrap(charset):
 +    def dec(callable):
 +        def wrapper(*args, **kwargs):
 +            bk = callable(*args, **kwargs)
 +            for string in bk:
 +                yield string.encode(charset)
 +        return wrapper
 +    return dec
 +
  def formparams(callable):
      def wrapper(req):
          data = form.formdata(req)