[shotwell] test: Fix missing content-length header for CGI parser



commit 5c94a2cacfef1c1b33ad7bf65159121d1d725b86
Author: Jens Georg <mail jensge org>
Date:   Thu Jan 16 11:00:36 2020 +0100

    test: Fix missing content-length header for CGI parser

 test/server.py | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/test/server.py b/test/server.py
index 10f3c70f..e4d34f78 100755
--- a/test/server.py
+++ b/test/server.py
@@ -36,6 +36,7 @@ class SimpleRequestHandler(http.server.BaseHTTPRequestHandler):
         self.log_message("Content-Type = " + ctype)
         if ctype == 'multipart/form-data':
             pdict['boundary'] = bytes(pdict['boundary'], 'utf-8')
+            pdict['CONTENT-LENGTH'] = self.headers['Content-Length']
             postvars = cgi.parse_multipart(self.rfile, pdict)
         elif ctype == 'application/x-www-form-urlencoded':
             length = int(self.headers['content-length'])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]