/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/http_server.py

  • Committer: Breezy landing bot
  • Author(s): Gustav Hartvigsson
  • Date: 2021-01-10 18:46:30 UTC
  • mfrom: (7526.1.1 brz-removed-api-doc)
  • mto: This revision was merged to the branch mainline in revision 7532.
  • Revision ID: breezy.the.bot@gmail.com-20210110184630-dxu0g9dqq020uiw6
Drop documentation for removed API API.

Merged from https://code.launchpad.net/~gustav-hartvigsson/brz/removed-api-doc/+merge/396033

Show diffs side-by-side

added added

removed removed

Lines of Context:
187
187
        header_line = '%s: %s\r\n' % (keyword, value)
188
188
        return len(header_line)
189
189
 
190
 
    def send_head(self):
191
 
        """Overrides base implementation to work around a bug in python2.5."""
192
 
        path = self.translate_path(self.path)
193
 
        if os.path.isdir(path) and not self.path.endswith('/'):
194
 
            # redirect browser - doing basically what apache does when
195
 
            # DirectorySlash option is On which is quite common (braindead, but
196
 
            # common)
197
 
            self.send_response(301)
198
 
            self.send_header("Location", self.path + "/")
199
 
            # Indicates that the body is empty for HTTP/1.1 clients
200
 
            self.send_header('Content-Length', '0')
201
 
            self.end_headers()
202
 
            return None
203
 
 
204
 
        return http_server.SimpleHTTPRequestHandler.send_head(self)
205
 
 
206
190
    def send_range_content(self, file, start, length):
207
191
        file.seek(start)
208
192
        self.wfile.write(file.read(length))