summaryrefslogtreecommitdiffstats
path: root/net/tools
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-15 04:36:51 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-15 04:36:51 +0000
commit71c64f6be0aa9b79c0243354106a5acb68b505d8 (patch)
treee10f749f2cd3b6d3b494fa24260e1fbb3d78cb42 /net/tools
parent9504f194280791e04b468ecb518e175305757c5f (diff)
downloadchromium_src-71c64f6be0aa9b79c0243354106a5acb68b505d8.zip
chromium_src-71c64f6be0aa9b79c0243354106a5acb68b505d8.tar.gz
chromium_src-71c64f6be0aa9b79c0243354106a5acb68b505d8.tar.bz2
Don't send Content-Type when redirecting from a POST.
http://code.google.com/p/chromium/issues/detail?id=843 Review URL: http://codereview.chromium.org/10873 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r--net/tools/testserver/testserver.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/tools/testserver/testserver.py b/net/tools/testserver/testserver.py
index 05e6561..851c83c 100644
--- a/net/tools/testserver/testserver.py
+++ b/net/tools/testserver/testserver.py
@@ -88,6 +88,7 @@ class TestPageHandler(BaseHTTPServer.BaseHTTPRequestHandler):
self.DownloadHandler,
self.DownloadFinishHandler,
self.EchoHeader,
+ self.EchoAllHandler,
self.FileHandler,
self.RealFileWithCommonHeaderHandler,
self.RealBZ2FileWithCommonHeaderHandler,
@@ -419,12 +420,14 @@ class TestPageHandler(BaseHTTPServer.BaseHTTPRequestHandler):
'<div style="float: right">'
'<a href="http://localhost:8888/echo">back to referring page</a></div>'
'<h1>Request Body:</h1><pre>')
- length = int(self.headers.getheader('content-length'))
- qs = self.rfile.read(length)
- params = cgi.parse_qs(qs, keep_blank_values=1)
- for param in params:
- self.wfile.write('%s=%s\n' % (param, params[param][0]))
+ if self.command == 'POST':
+ length = int(self.headers.getheader('content-length'))
+ qs = self.rfile.read(length)
+ params = cgi.parse_qs(qs, keep_blank_values=1)
+
+ for param in params:
+ self.wfile.write('%s=%s\n' % (param, params[param][0]))
self.wfile.write('</pre>')