Revision f4322a1e
b/lib/http/__init__.py | ||
---|---|---|
369 | 369 |
self.ssl_cert_pem) |
370 | 370 |
|
371 | 371 |
|
372 |
class HttpSocketBase(object):
|
|
372 |
class HttpBase(object): |
|
373 | 373 |
"""Base class for HTTP server and client. |
374 | 374 |
|
375 | 375 |
""" |
b/lib/http/client.py | ||
---|---|---|
141 | 141 |
return http.HttpServerToClientStartLine(version, status, reason) |
142 | 142 |
|
143 | 143 |
|
144 |
class HttpClientRequestExecutor(http.HttpSocketBase):
|
|
144 |
class HttpClientRequestExecutor(http.HttpBase): |
|
145 | 145 |
# Default headers |
146 | 146 |
DEFAULT_HEADERS = { |
147 | 147 |
http.HTTP_USER_AGENT: http.HTTP_GANETI_VERSION, |
... | ... | |
164 | 164 |
@param req: Request object |
165 | 165 |
|
166 | 166 |
""" |
167 |
http.HttpSocketBase.__init__(self)
|
|
167 |
http.HttpBase.__init__(self) |
|
168 | 168 |
self.request = req |
169 | 169 |
|
170 | 170 |
self.poller = select.poll() |
b/lib/http/server.py | ||
---|---|---|
379 | 379 |
self.response_msg.body = self.error_message_format % values |
380 | 380 |
|
381 | 381 |
|
382 |
class HttpServer(http.HttpSocketBase):
|
|
382 |
class HttpServer(http.HttpBase): |
|
383 | 383 |
"""Generic HTTP server class |
384 | 384 |
|
385 | 385 |
Users of this class must subclass it and override the HandleRequest function. |
... | ... | |
404 | 404 |
it with our certificate |
405 | 405 |
|
406 | 406 |
""" |
407 |
http.HttpSocketBase.__init__(self)
|
|
407 |
http.HttpBase.__init__(self) |
|
408 | 408 |
|
409 | 409 |
self.mainloop = mainloop |
410 | 410 |
self.local_address = local_address |
Also available in: Unified diff