diff options
| author | ianb <devnull@localhost> | 2005-12-29 16:42:54 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-12-29 16:42:54 +0000 |
| commit | 7ffd6eb7162db2708304370ce34df79c395ab41a (patch) | |
| tree | d5e74831055a56c218509c1aa152caedb9285ec5 /paste | |
| parent | fce7e2a8b75d8c414c0372ab3215a6190f88c6b9 (diff) | |
| download | paste-7ffd6eb7162db2708304370ce34df79c395ab41a.tar.gz | |
Added check for properly-formatted status
Diffstat (limited to 'paste')
| -rw-r--r-- | paste/lint.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/paste/lint.py b/paste/lint.py index a34b368..e99a54e 100644 --- a/paste/lint.py +++ b/paste/lint.py @@ -260,6 +260,11 @@ def check_status(status): "Status codes must be three characters: %r" % status_code) status_int = int(status_code) assert status_int >= 100, "Status code is invalid: %r" % status_int + if len(status) < 4 or status[4] != ' ': + warnings.warn( + "The status string (%r) should be a three-digit integer " + "followed by a single space and a status explanation" + % status, WSGIWarning) def check_headers(headers): assert type(headers) is ListType, ( |
