/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

Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
                self.headers.get('referer', '-'),
68
68
                self.headers.get('user-agent', '-'))
69
69
 
70
 
    def handle(self):
71
 
        SimpleHTTPServer.SimpleHTTPRequestHandler.handle(self)
72
 
        # Some client (pycurl, I'm looking at you) are more picky than others
73
 
        # and require that the socket itself is closed
74
 
        # (SocketServer.StreamRequestHandler only close the two associated
75
 
        # 'makefile' objects)
76
 
        self.connection.close()
77
 
 
78
70
    def handle_one_request(self):
79
71
        """Handle a single HTTP request.
80
72
 
502
494
 
503
495
    # urls returned by this server should require the urllib client impl
504
496
    _url_protocol = 'http+urllib'
505
 
 
506
 
 
507
 
class HttpServer_PyCurl(HttpServer):
508
 
    """Subclass of HttpServer that gives http+pycurl urls.
509
 
 
510
 
    This is for use in testing: connections to this server will always go
511
 
    through pycurl where possible.
512
 
    """
513
 
 
514
 
    # We don't care about checking the pycurl availability as
515
 
    # this server will be required only when pycurl is present
516
 
 
517
 
    # urls returned by this server should require the pycurl client impl
518
 
    _url_protocol = 'http+pycurl'