summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Gregorio <joe.gregorio@gmail.com>2012-08-28 11:45:44 -0500
committerJoe Gregorio <joe.gregorio@gmail.com>2012-08-28 11:45:44 -0500
commit1b849a7257e9543fe76935277ae6df2cf3f5b86e (patch)
tree83edd1fe1b9056d0beadbde50459d48c2e93aba9
parenta0e2b2a5020aa96b8c818d3584300da82c87d824 (diff)
downloadhttplib2-1b849a7257e9543fe76935277ae6df2cf3f5b86e.tar.gz
Fix some tests.
-rw-r--r--test/303/redirect-to-header-reflector.cgi13
-rwxr-xr-xtest/conditional-updates/test.cgi2
2 files changed, 14 insertions, 1 deletions
diff --git a/test/303/redirect-to-header-reflector.cgi b/test/303/redirect-to-header-reflector.cgi
new file mode 100644
index 0000000..e06b166
--- /dev/null
+++ b/test/303/redirect-to-header-reflector.cgi
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+import os
+
+# Always returns an empty response body
+# and adds in the X-Method: header with the
+# method that was sent to the CGI
+
+print "Status: 303 See Other"
+print "Location: http://bitworking.org/projects/httplib2/test/reflector/reflector.cgi"
+print "X-Method: %s" % os.environ['REQUEST_METHOD']
+print ""
+
+
diff --git a/test/conditional-updates/test.cgi b/test/conditional-updates/test.cgi
index 9d296ea..01a07b0 100755
--- a/test/conditional-updates/test.cgi
+++ b/test/conditional-updates/test.cgi
@@ -13,7 +13,7 @@ if "GET" == method:
print "Status: 200 Ok"
print "ETag: 123456789"
print ""
-elif method in ["PUT", "DELETE", "PATCH"]:
+elif method in ["PUT", "PATCH", "DELETE"]:
if "123456789" == os.environ.get('HTTP_IF_MATCH', ''):
print "Status: 200 Ok"
print ""