Merge pull request #111 from the4ndy/patch-1
Added ssl_ignore attribute to http_status platform
This commit is contained in:
commit
63b7864ca5
@ -63,6 +63,8 @@ class Platform:
|
|||||||
self.headers = None
|
self.headers = None
|
||||||
if not hasattr(self, "return_codes"):
|
if not hasattr(self, "return_codes"):
|
||||||
self.return_codes = "2xx,3xx"
|
self.return_codes = "2xx,3xx"
|
||||||
|
if not hasattr(self, "ssl_ignore"):
|
||||||
|
self.ssl_ignore = "No"
|
||||||
|
|
||||||
def process(self):
|
def process(self):
|
||||||
# Check if method is within allowed methods for http_status
|
# Check if method is within allowed methods for http_status
|
||||||
@ -84,6 +86,10 @@ class Platform:
|
|||||||
self.method.upper(), self.resource, headers=self.headers, auth=auth
|
self.method.upper(), self.resource, headers=self.headers, auth=auth
|
||||||
)
|
)
|
||||||
prepped = req.prepare()
|
prepped = req.prepare()
|
||||||
|
if self.ssl_ignore == "yes":
|
||||||
|
resp = s.send(prepped,verify=False)
|
||||||
|
else:
|
||||||
|
resp = s.send(prepped)
|
||||||
resp = s.send(prepped)
|
resp = s.send(prepped)
|
||||||
|
|
||||||
return_codes = tuple([x.replace("x", "") for x in self.return_codes.split(",")])
|
return_codes = tuple([x.replace("x", "") for x in self.return_codes.split(",")])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user