1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00
wget/testenv/exc/server_error.py
Hubert Tarasiuk 901bc98edf Support conditional GET in testenv server.
* src/exc/server_error.py: Add exception for GET to HEAD fallback.
* src/server/http/http_server.py: Do not send body if 304 return
code requested for a file.
2015-05-22 11:08:30 +02:00

20 lines
587 B
Python

class ServerError (Exception):
""" A custom exception which is raised by the test servers. Often used to
handle control flow. """
def __init__(self, err_message):
self.err_message = err_message
class NoBodyServerError (Exception):
""" A custom exception which is raised by the test servers.
Used if no body should be sent in response. """
def __init__(self, err_message):
self.err_message = err_message
class AuthError (ServerError):
""" A custom exception raised byt he servers when authentication of the
request fails. """
pass