diff tests/hgweberror.py @ 36865:3d60a22e27f5

hgweb: perform all parameter lookup via qsparams I think I managed to update all call sites using wsgirequest.form to use parsedrequest.qsparams. Since behavior of qsparams is to retrieve last value, behavior will change if a parameter was specified multiple times. But I think this is acceptable. I'm not a fan of the `req.req.qsparams` pattern. And some of the modified code could be written better. But I was aiming for a straight port with this change. Cleanup can come later. Differential Revision: https://phab.mercurial-scm.org/D2781
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 10 Mar 2018 12:36:36 -0800
parents 74e6de99ce7f
children 97f44b0720e2
line wrap: on
line diff
--- a/tests/hgweberror.py	Sat Mar 10 12:11:26 2018 -0800
+++ b/tests/hgweberror.py	Sat Mar 10 12:36:36 2018 -0800
@@ -10,7 +10,7 @@
     '''Dummy web command that raises an uncaught Exception.'''
 
     # Simulate an error after partial response.
-    if 'partialresponse' in req.form:
+    if 'partialresponse' in req.req.qsparams:
         req.respond(200, 'text/plain')
         req.write('partial content\n')