  
      def __repr__(self):
          return "<%s %s>" % (self.__class__.__name__, self.response)
-@@ -408,9 +408,22 @@
+@@ -174,7 +175,7 @@
+             "Document moved to %s." % (location,)
+         )
+ 
+-        self.headers.setHeader("location", location)
++        self.headers.setHeader("location", urllib.quote(location, safe=":/"))
+ 
+         
+ def NotModifiedResponse(oldResponse=None):
+@@ -408,9 +409,22 @@
      def _sendContinue(self):
          self.chanRequest.writeIntermediateResponse(responsecode.CONTINUE)
  

 
     def _error(self, reason):
         if reason.check(error.ConnectionLost):
@@ -471,5 +484,5 @@
 else:
     components.registerAdapter(compat.OldResourceAdapter, resource.IResource, iweb.IOldNevowResource)
 

 
 defaultPortForScheme = {'http': 80, 'https':443, 'ftp':21}
 
@@ -66,9 +67,9 @@
             object.
         @type codeOrResponse: C{int} or L{http.Response}
         """
