mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-21 23:29:47 +00:00
S3 Fuzzer: httplib error handling
Sometimes httplib will through a BadStatusLine error that the fuzzer should catch and register as a failure.
This commit is contained in:
parent
d0a42a7a89
commit
046b92b7eb
2 changed files with 6 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
import sys
|
||||
mport sys
|
||||
import itertools
|
||||
import nose
|
||||
import random
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from boto.s3.connection import S3Connection
|
||||
from boto.exception import BotoServerError
|
||||
from boto.s3.key import Key
|
||||
from httplib import BadStatusLine
|
||||
from optparse import OptionParser
|
||||
from . import common
|
||||
|
||||
|
@ -341,6 +342,10 @@ def _main():
|
|||
response = e
|
||||
body = e.body
|
||||
failed = True
|
||||
except BadStatusLine, e:
|
||||
print>>OUT, 'FAILED: failed to parse response (BadStatusLine); probably a NUL byte in your request?'
|
||||
print>>VERBOSE, '='*80
|
||||
continue
|
||||
|
||||
if failed:
|
||||
print>>OUT, 'FAILED:'
|
||||
|
|
Loading…
Reference in a new issue