Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/hgwebdir_mod.py @ 36863:1a1972b1a1ff
hgweb: use our new request object for "style" parameter
The "style" parameter is kind of wonky because it is explicitly
set and has lookups in random locations.
Let's port it to qsparams first because it isn't straightforward.
There is subtle change in behavior. But I don't think it is worth
calling out in a BC.
Our multidict's __getitem__ returns the last set value for a key,
not the first. So if the query string set a variable multiple times,
before we would get the first value and now we would get the last
value. It makes no sense to specify these things multiple times.
And I think last write wins is more sensible than first write wins.
Differential Revision: https://phab.mercurial-scm.org/D2779
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 10 Mar 2018 11:46:52 -0800 |
parents | da4e2f87167d |
children | 3d60a22e27f5 |
comparison
equal
deleted
inserted
replaced
36862:ec0af9c59270 | 36863:1a1972b1a1ff |
---|---|
508 url = wsgireq.env.get('SCRIPT_NAME', '') | 508 url = wsgireq.env.get('SCRIPT_NAME', '') |
509 if not url.endswith('/'): | 509 if not url.endswith('/'): |
510 url += '/' | 510 url += '/' |
511 | 511 |
512 vars = {} | 512 vars = {} |
513 styles, (style, mapfile) = hgweb_mod.getstyle(wsgireq, config, | 513 styles, (style, mapfile) = hgweb_mod.getstyle(wsgireq.req, config, |
514 self.templatepath) | 514 self.templatepath) |
515 if style == styles[0]: | 515 if style == styles[0]: |
516 vars['style'] = style | 516 vars['style'] = style |
517 | 517 |
518 sessionvars = webutil.sessionvars(vars, r'?') | 518 sessionvars = webutil.sessionvars(vars, r'?') |