Statistics
| Branch: | Tag: | Revision:

root / lib / http @ 7c4d6c7b

# Date Author Comment
7c4d6c7b 07/07/2009 03:54 pm Michael Hanselmann

Fix pylint warnings

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

5bbd3f7f 07/07/2009 03:51 pm Michael Hanselmann

Fix some typos

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

81b59aaf 06/23/2009 03:19 pm Iustin Pop

Fix HTTP server library handling of credentials

Currently the http library only checks credentials when authentication
is required. This means that any credentials are accepted on the root
resource, for example, which makes problems hard to diagnose - the...

8a088b79 03/20/2009 03:07 pm Guido Trotter

Fix _NOQUOTE regexp

Allow expressions longer than one character to match.

Reviewed-by: imsnah

5fcc718f 02/27/2009 03:06 pm Iustin Pop

Fix some epydoc style issues

99% of the epydoc return tags are "@return:", but each of the modified files
had one "@returns:" line. We fix this for consistency.

Reviewed-by: imsnah

1f8588f6 02/13/2009 01:38 pm Iustin Pop

RAPI: format error messages as JSON

This patch changes the format of the HTTP error messages from text/html, which
is hard to parse from RAPI clients, to JSON which can be automatically parsed.

The error message is an object, which contains always three keys:...

77e1d753 02/13/2009 01:38 pm Iustin Pop

Make RAPI return 502/504 errors for luxi errors

This changes the RAPI error codes for luxi errors; a timeout error is
now reported properly as 504, while any other luxi error is reported as
502.

It would be good to convert even more errors into proper return codes in...

85414b69 02/04/2009 05:11 pm Iustin Pop

rapi: fix authentication and queries

For queries, we don't want to require authentication. We fix this by adding an
override GetAuthRealm in the rapi daemon.

We also fix a method name.

Reviewed-by: imsnah

25e7b43f 01/15/2009 12:00 pm Iustin Pop

Some docstring updates

This patch rewraps some comments to shorter lengths, changes
double-quotes to single-quotes inside triple-quoted docstrings for
better editor handling.

It also fixes some epydoc errors, namely invalid crossreferences (after
method rename), documentation for inexistent (removed) parameters, etc....

14d57a8b 01/15/2009 12:00 pm Iustin Pop

ganeti-noded: reduce log noise

The source port/addr is currently logged three times for each
connection, and this is unnecessary. We change two log entries to debug,
since they are useful for precise timing, and we keep only one at INFO
level.

Reviewed-by: imsnah

e09fdcfa 01/06/2009 11:57 am Iustin Pop

Fix some pylint-detected issues

Two bad indentation cases and a missing variable.

Reviewed-by: imsnah

e6e94655 12/19/2008 02:57 pm Michael Hanselmann

ganeti.http: Function to read password file

Lines in the password file are of the following format:

&lt;username&gt; &lt;password&gt; [options]

Fields are separated by whitespace. Username and password are
mandatory, options are optional and separated by comma (",")....

68fa9caf 12/19/2008 02:57 pm Michael Hanselmann

ganeti.http: Add support for private data in HTTP requests

Reviewed-by: amishchenko

be500c29 12/19/2008 02:57 pm Michael Hanselmann

ganeti.http: Add support for basic HTTP authentication

As per RFC2617.

Reviewed-by: amishchenko

f8bd7df3 12/19/2008 02:57 pm Michael Hanselmann

ganeti.http: Prepare authentication for HTTP server

The authentication class will override PreHandleRequest.

Reviewed-by: amishchenko

aea0ed67 12/18/2008 06:21 pm Michael Hanselmann

ganeti.http: Don't pass poller object around

They're cheap to instantiate and doing this changes makes the code
a bit simpler.

Reviewed-by: ultrotter

79589f25 12/18/2008 03:45 pm Michael Hanselmann

Rename http.HttpInternalError to HttpInternalServerError

All other exceptions are named after the error name in RFC2616 (HTTP/1.1).

Reviewed-by: amishchenko

b3660886 12/18/2008 03:45 pm Michael Hanselmann

ganeti.http: Add more constants and errors

Reviewed-by: amishchenko

45eac583 12/18/2008 03:45 pm Michael Hanselmann

ganeti.http: Ignore ENOTCONN when shutting down the connection

Reviewed-by: amishchenko

a8e01e9f 12/18/2008 03:44 pm Michael Hanselmann

Implement support for additional headers with HTTP errors

Reviewed-by: amishchenko

f30ca1e6 12/17/2008 04:30 pm Michael Hanselmann

Add simple unittests for ganeti.http

More complex unittests will need some refactoring in the HTTP code.

Reviewed-by: amishchenko

f088165d 12/15/2008 12:06 pm Michael Hanselmann

ganeti.http: Add three TODOs for improvements

Reviewed-by: iustinp

f2e13d55 12/15/2008 11:48 am Michael Hanselmann

ganeti.http: Explicitly initiate handshake

Otherwise it would be done on the first read/write operation, making
error handling more difficult (such as EOF during handshake).

Reviewed-by: iustinp

d7fa9982 12/15/2008 11:40 am Michael Hanselmann

ganeti.http: Implement handshake socket operation

Reviewed-by: iustinp

39cfc25b 12/15/2008 11:40 am Michael Hanselmann

ganeti.http: Handle SSL_ERROR_ZERO_RETURN

Also add a comment next to the place where the SSL connection is shut
down.

Reviewed-by: iustinp

3f3dfc15 12/14/2008 02:05 pm Iustin Pop

cleanup: http server, line too long

Reviewed-by: amishchenko

5a9c3f46 12/14/2008 02:05 pm Iustin Pop

cleanup: http client, line too long

Reviewed-by: amishchenko

22692e48 12/12/2008 06:50 pm Michael Hanselmann

ganeti.http: Rename HttpBase._using_ssl to HttpBase.using_ssl

It'll be queried from other classes.

Reviewed-by: iustinp

f4322a1e 12/12/2008 06:50 pm Michael Hanselmann

ganeti.http: Rename HttpSocketBase to HttpBase

It's more appropriate.

Reviewed-by: iustinp

c41eea6e 12/11/2008 07:13 pm Iustin Pop

Fix epydoc format warnings

This patch should fix all outstanding epydoc parsing errors; as such, we
switch epydoc into verbose mode so that any new errors will be visible.

Reviewed-by: imsnah

358a8811 12/10/2008 02:06 pm Michael Hanselmann

ganeti.http: Docstring updates

Reviewed-by: iustinp

13b63666 12/09/2008 08:42 pm Michael Hanselmann

ganeti.http: Remove _HttpClientError

This is a leftover from old code.

Reviewed-by: iustinp

59305197 12/09/2008 07:35 pm Michael Hanselmann

ganeti.http.server: Increase connection backlog to 1024

This solves a problem with many concurrent requests. By default, 1024
is the maximum backlog on Linux kernels. We limit the number of clients
through MAX_CHILDREN, too. The idea of just increasing the backlog is...

b18dd019 12/05/2008 12:12 pm Iustin Pop

http: use slicing instead of string modification

The combination of the current buffer splitting method and (4KB) buffer
size is very inefficient when writing big amounts of data. Just walking
over a 16 megabyte string using a 4K buffer takes (on a random computer)...

99b5ef90 12/04/2008 05:25 pm Michael Hanselmann

ganeti.http: Add constant for DELETE

Reviewed-by: amishchenko

9501323b 12/04/2008 05:25 pm Michael Hanselmann

Remove old HTTP code

Reviewed-by: amishchenko

02cab3e7 12/04/2008 05:23 pm Michael Hanselmann

ganeti.http: Split HTTP server and client into separate files

This includes a large rewrite of the HTTP server code. The handling of
OpenSSL errors had some problems that were hard to fix with its
structure. When preparing all of this, I realized that actually HTTP...

84f2756e 12/04/2008 05:23 pm Michael Hanselmann

Rename all HTTP classes to camel case

It should be consistent.

Reviewed-by: amishchenko

c9d0fa8a 12/04/2008 05:22 pm Michael Hanselmann

ganeti.http: Remove underline from two classes

This is a preparation step for splitting the HTTP client and server code
into two separate modules.

Reviewed-by: amishchenko

ff9efc03 12/04/2008 05:22 pm Michael Hanselmann

Move HTTP code to subpackage

This is a preparation step for splitting the HTTP client and server code
into two separate modules.

Reviewed-by: amishchenko