##// END OF EJS Templates
hgweb: remove wsgirequest.form (API)...
Gregory Szorc -
r36882:cf69df7e default
parent child Browse files
Show More
@@ -341,19 +341,15 b' class hgweb(object):'
341
341
342 # avoid accepting e.g. style parameter as command
342 # avoid accepting e.g. style parameter as command
343 if util.safehasattr(webcommands, cmd):
343 if util.safehasattr(webcommands, cmd):
344 wsgireq.form['cmd'] = [cmd]
345 req.qsparams['cmd'] = cmd
344 req.qsparams['cmd'] = cmd
346
345
347 if cmd == 'static':
346 if cmd == 'static':
348 wsgireq.form['file'] = ['/'.join(args)]
349 req.qsparams['file'] = '/'.join(args)
347 req.qsparams['file'] = '/'.join(args)
350 else:
348 else:
351 if args and args[0]:
349 if args and args[0]:
352 node = args.pop(0).replace('%2F', '/')
350 node = args.pop(0).replace('%2F', '/')
353 wsgireq.form['node'] = [node]
354 req.qsparams['node'] = node
351 req.qsparams['node'] = node
355 if args:
352 if args:
356 wsgireq.form['file'] = args
357 if 'file' in req.qsparams:
353 if 'file' in req.qsparams:
358 del req.qsparams['file']
354 del req.qsparams['file']
359 for a in args:
355 for a in args:
@@ -368,9 +364,7 b' class hgweb(object):'
368 for type_, spec in rctx.archivespecs.iteritems():
364 for type_, spec in rctx.archivespecs.iteritems():
369 ext = spec[2]
365 ext = spec[2]
370 if fn.endswith(ext):
366 if fn.endswith(ext):
371 wsgireq.form['node'] = [fn[:-len(ext)]]
372 req.qsparams['node'] = fn[:-len(ext)]
367 req.qsparams['node'] = fn[:-len(ext)]
373 wsgireq.form['type'] = [type_]
374 req.qsparams['type'] = type_
368 req.qsparams['type'] = type_
375 else:
369 else:
376 cmd = req.qsparams.get('cmd', '')
370 cmd = req.qsparams.get('cmd', '')
@@ -387,7 +381,6 b' class hgweb(object):'
387 self.check_perm(rctx, wsgireq, None)
381 self.check_perm(rctx, wsgireq, None)
388
382
389 if cmd == '':
383 if cmd == '':
390 wsgireq.form['cmd'] = [tmpl.cache['default']]
391 req.qsparams['cmd'] = tmpl.cache['default']
384 req.qsparams['cmd'] = tmpl.cache['default']
392 cmd = req.qsparams['cmd']
385 cmd = req.qsparams['cmd']
393
386
@@ -426,7 +426,6 b' class wsgirequest(object):'
426 self.run_once = wsgienv[r'wsgi.run_once']
426 self.run_once = wsgienv[r'wsgi.run_once']
427 self.env = wsgienv
427 self.env = wsgienv
428 self.req = parserequestfromenv(wsgienv, inp)
428 self.req = parserequestfromenv(wsgienv, inp)
429 self.form = self.req.qsparams.asdictoflists()
430 self.res = wsgiresponse(self.req, start_response)
429 self.res = wsgiresponse(self.req, start_response)
431 self._start_response = start_response
430 self._start_response = start_response
432 self.server_write = None
431 self.server_write = None
General Comments 0
You need to be logged in to leave comments. Login now