Commits

ianb  committed 995f678

status_map dictionary of exceptions from Jacob Smullyan; and a fixme comment

  • Participants
  • Parent commits a43b407

Comments (0)

Files changed (2)

File webob/__init__.py

 
     cookies = property(cookies, doc=cookies.__doc__)
 
+    ## FIXME: there should be a way to turn the request into a GET as part
+    ## of the copy; often a copied request is a safe subrequest of some sort,
+    ## and only GET is really safe (HEAD being uncommon)
     def copy(self):
         """
         Copy the request and environment object.

File webob/exc.py

             obj.__bases__ = obj.__bases__ + (getattr(httpexceptions, name),)
     del name, obj, httpexceptions
 
-__all__ = ['HTTPExceptionMiddleware']
+__all__ = ['HTTPExceptionMiddleware', 'status_map']
+status_map={}
 for name, value in globals().items():
     if (isinstance(value, type) and issubclass(value, HTTPException)
         and not name.startswith('_')):
         __all__.append(name)
+        if value.code:
+            status_map[value.code]=value
 del name, value