Statistics
| Branch: | Tag: | Revision:

root / lib / http.py @ 21f04e5e

History | View | Annotate | Download (41.1 kB)

# Date Author Comment
65c6b8e0 11/25/2008 01:18 pm Michael Hanselmann

ganeti.http: Don't reuse key and cert objects

Reusing the private key and certificate objects gave us problems. This
patch changes the code to only cache the PEM data, but the objects
themselves. For every socket, the private key and certificate objects
are created again....

f20cbea2 11/21/2008 12:46 pm Michael Hanselmann

ganeti.http: Add another class to contain SSL key and certificate

Otherwise we would read them for every request the HTTP client
makes against a server and this is not needed.

Reviewed-by: iustinp

33bbdbec 11/19/2008 03:18 pm Michael Hanselmann

Make HttpClientManager threadsafe

This allows a single HttpClientManager to be used from more than one
thread at the same time. We discussed having one HttpClientManager
per job queue thread. Assuming there should be one HTTP thread per
node, this would mean quadratic growth with the number of nodes. By...

7c46aafd 11/19/2008 02:59 pm Oleksiy Mishchenko

HTTP server: Do not decode empty entity body

Reviewed-by: imsnah

438a366a 11/11/2008 06:16 pm Michael Hanselmann

ganeti.http: Implement SSL for HTTP client

Implementing SSL for the HTTP client required more work than I expected.
For correct error handling, quite a lot of code is needed. To avoid
code duplication, I moved a lot of the socket handling code into a
single function named _SocketOperation. It takes care of the polling...

b14f759e 11/10/2008 02:38 pm Michael Hanselmann

ganeti.http: Move SSL socket creation into base class

The same code will be used by the HTTP client.

Reviewed-by: iustinp

d7bace1b 11/10/2008 12:14 pm Michael Hanselmann

ganeti.http: Add constant for "Unexpected EOF"

This is an expected error message and will be used in two places.

Reviewed-by: iustinp

8a0b06d2 11/06/2008 01:25 pm Michael Hanselmann

Add new HTTP client class

It is based on the WorkerPool class which is already used for the job
queue and master daemon. Each request must be encapsulated in an
instance of HttpClientRequest, which will then be passed to
HttpClientManager for processing. Upon completion, the request object...

64357ed8 11/06/2008 01:24 pm Michael Hanselmann

ganeti.http: Use 411 Length Required in server code

Reviewed-by: iustinp

8a9f9060 11/05/2008 04:04 pm Michael Hanselmann

ganeti.http: Add more constants

As a preparation for the new HTTP client class, add more constants
to ganeti.http.

Reviewed-by: iustinp

f2a6fc9e 10/24/2008 02:49 pm Michael Hanselmann

ganeti.http: Implement SSL certificates

Reviewed-by: killerfoxi

23e46494 10/24/2008 02:31 pm Michael Hanselmann

Document HttpServer.__init__

At the same time, simplify the interface a bit by not using a tuple.

Reviewed-by: killerfoxi, ultrotter

6526ddcd 10/23/2008 02:58 pm Michael Hanselmann

http library: Always fork before reading request

It turned out that clients not sending a full request will stop
us from responding to further requests. This patch leverages the
situation a bit by always forking before handling the request,
but we still have DoS situations....

263ab7cf 10/20/2008 03:50 pm Iustin Pop

Convert http.py to use the logging module

Reviewed-by: imsnah

fa10bdc5 10/20/2008 02:04 pm Michael Hanselmann

Remove old HTTP server code

All users of this code have been migrated to the new and shiny HttpServer
class.

It also fixes a typo in the ApacheLogfile unittests. It has not yet been
decided whether we should keep ApacheLogfile or not, hence leaving it in....

713faea6 10/17/2008 04:06 pm Oleksiy Mishchenko

ETag passing support.

Reviewed-by: imsnah

42242313 10/10/2008 07:00 pm Michael Hanselmann

Add new HTTP server implementation

This patch adds another implementation of an HTTP server. It's
based on code of Python's BaseHTTPServer, from both version
2.4 and 3k. In the future we can write code to decide whether
we should fork for a request or not. Keep-alive is not supported....

38206f3c 07/30/2008 05:04 pm Iustin Pop

Fix pylint-detected issues

This is mostly:
- whitespace fix (space at EOL in some files, not all, broken
indentation, etc)
- variable names overriding others (one is a real bug in there)
- too-long-lines
- cleanup of most unused imports (not all)...

a0638838 07/24/2008 07:34 pm Oleksiy Mishchenko

Switch RAPI to ganeti.http module

Reviewed-by: imsnah

a43f68dc 07/11/2008 03:20 pm Michael Hanselmann

Add generic HTTP server classes

Some of the code is adopted from the 1.2 branch
(lib/rapi/RESTHTTPServer.py). This code can be used as a base for the
various HTTP servers in Ganeti.

Reviewed-by: iustinp