|
@@ -63,13 +63,13 @@ class FrameworkTestType:
|
|
# Use -i to output response with headers
|
|
# Use -i to output response with headers
|
|
# Don't use -f so that the HTTP response code is ignored.
|
|
# Don't use -f so that the HTTP response code is ignored.
|
|
# Use -sS to hide progress bar, but show errors.
|
|
# Use -sS to hide progress bar, but show errors.
|
|
- print "Accessing URL %s" % url
|
|
|
|
|
|
+ print "Accessing URL %s:" % url
|
|
self.err.write("Accessing URL %s \n" % url)
|
|
self.err.write("Accessing URL %s \n" % url)
|
|
self.out.write("Accessing URL %s \n" % url)
|
|
self.out.write("Accessing URL %s \n" % url)
|
|
p = subprocess.Popen(["curl", "-m", "15", "-i", "-sS", url], stderr=PIPE, stdout=PIPE)
|
|
p = subprocess.Popen(["curl", "-m", "15", "-i", "-sS", url], stderr=PIPE, stdout=PIPE)
|
|
(out, err) = p.communicate()
|
|
(out, err) = p.communicate()
|
|
self.err.write(err+'\n')
|
|
self.err.write(err+'\n')
|
|
- self.out.write("Response: \n\"" + out+ "\"\n")
|
|
|
|
|
|
+ self.out.write("Response: \n\"" + out.strip() + "\"\n")
|
|
if p.returncode != 0:
|
|
if p.returncode != 0:
|
|
return None
|
|
return None
|
|
return out
|
|
return out
|
|
@@ -83,7 +83,7 @@ class FrameworkTestType:
|
|
# Get response body
|
|
# Get response body
|
|
p = subprocess.Popen(["curl", "-m", "15", "-s", url], stdout=PIPE, stderr=PIPE)
|
|
p = subprocess.Popen(["curl", "-m", "15", "-s", url], stdout=PIPE, stderr=PIPE)
|
|
(out, err) = p.communicate()
|
|
(out, err) = p.communicate()
|
|
- print " Response (trimmed to 40 bytes): \"%s\"" % out[:40]
|
|
|
|
|
|
+ print " Response (trimmed to 40 bytes): \"%s\"" % out.strip()[:40]
|
|
return out
|
|
return out
|
|
|
|
|
|
def verify(self, base_url):
|
|
def verify(self, base_url):
|