~ubuntu-branches/ubuntu/trusty/swift/trusty-updates

« back to all changes in this revision

Viewing changes to swift/proxy/server.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-01-28 09:40:30 UTC
  • mfrom: (1.2.16)
  • Revision ID: package-import@ubuntu.com-20130128094030-aetz57x2qz9ye2d4
Tags: 1.7.6-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
            req = self.update_request(Request(env))
148
148
            return self.handle_request(req)(env, start_response)
149
149
        except UnicodeError:
150
 
            err = HTTPPreconditionFailed(request=req, body='Invalid UTF8')
 
150
            err = HTTPPreconditionFailed(
 
151
                request=req, body='Invalid UTF8 or contains NULL')
151
152
            return err(env, start_response)
152
153
        except (Exception, Timeout):
153
154
            start_response('500 Server Error',
177
178
            try:
178
179
                if not check_utf8(req.path_info):
179
180
                    self.logger.increment('errors')
180
 
                    return HTTPPreconditionFailed(request=req,
181
 
                                                  body='Invalid UTF8')
 
181
                    return HTTPPreconditionFailed(
 
182
                        request=req, body='Invalid UTF8 or contains NULL')
182
183
            except UnicodeError:
183
184
                self.logger.increment('errors')
184
 
                return HTTPPreconditionFailed(request=req, body='Invalid UTF8')
 
185
                return HTTPPreconditionFailed(
 
186
                    request=req, body='Invalid UTF8 or contains NULL')
185
187
 
186
188
            try:
187
189
                controller, path_parts = self.get_controller(req.path)