~debian-bazaar/bzr-webdav/unstable

« back to all changes in this revision

Viewing changes to tests/dav_server.py

  • Committer: Jelmer Vernooij
  • Date: 2010-10-09 23:04:47 UTC
  • mfrom: (61.2.1 upstream)
  • Revision ID: jelmer@debian.org-20101009230447-m0ubiciembe7zdhj
* New upstream snapshot.
* Switch to source format 3.
* Bump standards version to 3.9.1 (no changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
    def do_PUT(self):
152
152
        """Serve a PUT request."""
153
153
        # FIXME: test_put_file_unicode makes us emit a traceback because a
154
 
        # UnicodeEncodeError occurs after the request headers have been sent be
155
 
        # before the body can be send. It's harmless and do not make the test
156
 
        # fails. Adressing that will mean protecting all reads from the socket,
157
 
        # which is too heavy for now -- vila 20070917
 
154
        # UnicodeEncodeError occurs after the request headers have been sent
 
155
        # but before the body can be send. It's harmless and does not make the
 
156
        # test fails. Adressing that will mean protecting all reads from the
 
157
        # socket, which is too heavy for now -- vila 20070917
158
158
        path = self.translate_path(self.path)
159
 
        trace.mutter("do_PUT rel: [%s], abs: [%s]" % (self.path,path))
 
159
        trace.mutter("do_PUT rel: [%s], abs: [%s]" % (self.path, path))
160
160
 
161
161
        do_append = False
162
162
        # Check the Content-Range header
186
186
            else:
187
187
                f = open(path, 'wb')
188
188
        except (IOError, OSError), e :
 
189
            trace.mutter("do_PUT got: [%r] while opening/seeking on [%s]"
 
190
                         % (e, self.path))
189
191
            self.send_error(409, 'Conflict')
190
192
            return
191
193