Remove http.HttpJsonConverter
With the move of the content-type handling to the various users of the HTTPlayer, this class isn't really useful anymore.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
http.server: No longer enfore JSON encoding for body
The HTTP layer shouldn't care about the contents of the request data orresponses. This requires further changes in the RAPI code to handle clientrequests correctly.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
http.server: Refuse HTTP/1.1 request without Host header
http: Add two new exceptions, one constant
These will be useful in the future in case we don't enfore JSON encodinganymore in the http.server module. The HTTP 1.1 RFC recommends error 415(Unsupported Media Type) to be returned in case the client requests an...
Factorize LUXI parsing and handling code
Also fix a typo in http/__init__.py and add unittestsfor the LUXI parsing and formatting functions.
Merge remote branch 'devel-2.1'
Fix unused imports or add silences where needed
In some cases pylint doesn't parse the import correctly, so we addsilences; but there are also many cases of unused imports, which wesimply remove.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Further pylint disables, mostly for Unused args
Many of our functions have to follow a given API, and thus we have tokeep a given signature, but pylint doesn't understand this. Therefore,we silence this warning.
The patch does a few other cleanups.
Signed-off-by: Iustin Pop <iustin@google.com>...
Convert to static methods (where appropriate)
Many methods are simple pure functions, and not depending on the objectstate. We convert these to staticmethods.
Add targeted pylint disables
This patch should have only:
- pylint disables- docstring changes- whitespace changes
View revisions
Also available in: Atom