Patchwork D2774: hgweb: remove support for POST form data (BC)

login
register
mail settings
Submitter phabricator
Date March 12, 2018, 9:32 p.m.
Message ID <450d0682768a1f7d3a9a78b856188c94@localhost.localdomain>
Download mbox | patch
Permalink /patch/29352/
State Not Applicable
Headers show

Comments

phabricator - March 12, 2018, 9:32 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG01f6bba64424: hgweb: remove support for POST form data (BC) (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2774?vs=6834&id=6910

REVISION DETAIL
  https://phab.mercurial-scm.org/D2774

AFFECTED FILES
  mercurial/hgweb/request.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/hgweb/request.py b/mercurial/hgweb/request.py
--- a/mercurial/hgweb/request.py
+++ b/mercurial/hgweb/request.py
@@ -8,7 +8,6 @@ 
 
 from __future__ import absolute_import
 
-import cgi
 import errno
 import socket
 import wsgiref.headers as wsgiheaders
@@ -258,15 +257,12 @@ 
         self.multiprocess = wsgienv[r'wsgi.multiprocess']
         self.run_once = wsgienv[r'wsgi.run_once']
         self.env = wsgienv
-        self.form = normalize(cgi.parse(inp,
-                                        self.env,
-                                        keep_blank_values=1))
+        self.req = parserequestfromenv(wsgienv, inp)
+        self.form = normalize(self.req.querystringdict)
         self._start_response = start_response
         self.server_write = None
         self.headers = []
 
-        self.req = parserequestfromenv(wsgienv, inp)
-
     def respond(self, status, type, filename=None, body=None):
         if not isinstance(type, str):
             type = pycompat.sysstr(type)