Show More
@@ -342,15 +342,22 b' class hgweb(object):' | |||
|
342 | 342 | # avoid accepting e.g. style parameter as command |
|
343 | 343 | if util.safehasattr(webcommands, cmd): |
|
344 | 344 | wsgireq.form['cmd'] = [cmd] |
|
345 | req.qsparams['cmd'] = cmd | |
|
345 | 346 | |
|
346 | 347 | if cmd == 'static': |
|
347 | 348 | wsgireq.form['file'] = ['/'.join(args)] |
|
349 | req.qsparams['file'] = '/'.join(args) | |
|
348 | 350 | else: |
|
349 | 351 | if args and args[0]: |
|
350 | 352 | node = args.pop(0).replace('%2F', '/') |
|
351 | 353 | wsgireq.form['node'] = [node] |
|
354 | req.qsparams['node'] = node | |
|
352 | 355 | if args: |
|
353 | 356 | wsgireq.form['file'] = args |
|
357 | if 'file' in req.qsparams: | |
|
358 | del req.qsparams['file'] | |
|
359 | for a in args: | |
|
360 | req.qsparams.add('file', a) | |
|
354 | 361 | |
|
355 | 362 | ua = req.headers.get('User-Agent', '') |
|
356 | 363 | if cmd == 'rev' and 'mercurial' in ua: |
@@ -362,7 +369,9 b' class hgweb(object):' | |||
|
362 | 369 | ext = spec[2] |
|
363 | 370 | if fn.endswith(ext): |
|
364 | 371 | wsgireq.form['node'] = [fn[:-len(ext)]] |
|
372 | req.qsparams['node'] = fn[:-len(next)] | |
|
365 | 373 | wsgireq.form['type'] = [type_] |
|
374 | req.qsparams['type'] = type_ | |
|
366 | 375 | else: |
|
367 | 376 | cmd = wsgireq.form.get('cmd', [''])[0] |
|
368 | 377 | |
@@ -379,6 +388,7 b' class hgweb(object):' | |||
|
379 | 388 | |
|
380 | 389 | if cmd == '': |
|
381 | 390 | wsgireq.form['cmd'] = [tmpl.cache['default']] |
|
391 | req.qsparams['cmd'] = tmpl.cache['default'] | |
|
382 | 392 | cmd = wsgireq.form['cmd'][0] |
|
383 | 393 | |
|
384 | 394 | # Don't enable caching if using a CSP nonce because then it wouldn't |
General Comments 0
You need to be logged in to leave comments.
Login now