mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 03:47:22 +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 itertools
|
||||||
import nose
|
import nose
|
||||||
import random
|
import random
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from boto.s3.connection import S3Connection
|
from boto.s3.connection import S3Connection
|
||||||
from boto.exception import BotoServerError
|
from boto.exception import BotoServerError
|
||||||
from boto.s3.key import Key
|
from boto.s3.key import Key
|
||||||
|
from httplib import BadStatusLine
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
from . import common
|
from . import common
|
||||||
|
|
||||||
|
@ -341,6 +342,10 @@ def _main():
|
||||||
response = e
|
response = e
|
||||||
body = e.body
|
body = e.body
|
||||||
failed = True
|
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:
|
if failed:
|
||||||
print>>OUT, 'FAILED:'
|
print>>OUT, 'FAILED:'
|
||||||
|
|
Loading…
Reference in a new issue