/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 bzrlib/tests/HttpServer.py

  • Committer: John Arbash Meinel
  • Date: 2007-12-20 12:34:06 UTC
  • mfrom: (3133 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3134.
  • Revision ID: john@arbash-meinel.com-20071220123406-4ijq232s46ecsutz
[merge] bzr.dev 3133

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006, 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
142
142
                                                                  file_size))
143
143
            self.end_headers()
144
144
            self.send_range_content(file, start, end - start + 1)
145
 
            self.wfile.write("--%s\r\n" % boundary)
 
145
        # Final boundary
 
146
        self.wfile.write("--%s\r\n" % boundary)
146
147
 
147
148
    def do_GET(self):
148
149
        """Serve a GET request.
149
150
 
150
151
        Handles the Range header.
151
152
        """
 
153
        # Update statistics
 
154
        self.server.test_case_server.GET_request_nb += 1
152
155
 
153
156
        path = self.translate_path(self.path)
154
157
        ranges_header_value = self.headers.get('Range')
304
307
        self.host = 'localhost'
305
308
        self.port = 0
306
309
        self._httpd = None
 
310
        # Allows tests to verify number of GET requests issued
 
311
        self.GET_request_nb = 0
307
312
 
308
313
    def _get_httpd(self):
309
314
        if self._httpd is None: