Show More
@@ -312,7 +312,7 b' class hgweb(object):' | |||||
312 |
|
312 | |||
313 | # This state is global across all threads. |
|
313 | # This state is global across all threads. | |
314 | encoding.encoding = rctx.config('web', 'encoding') |
|
314 | encoding.encoding = rctx.config('web', 'encoding') | |
315 |
rctx.repo.ui.environ = |
|
315 | rctx.repo.ui.environ = req.rawenv | |
316 |
|
316 | |||
317 | if rctx.csp: |
|
317 | if rctx.csp: | |
318 | # hgwebdir may have added CSP header. Since we generate our own, |
|
318 | # hgwebdir may have added CSP header. Since we generate our own, |
@@ -149,6 +149,8 b' class parsedrequest(object):' | |||||
149 | headers = attr.ib() |
|
149 | headers = attr.ib() | |
150 | # Request body input stream. |
|
150 | # Request body input stream. | |
151 | bodyfh = attr.ib() |
|
151 | bodyfh = attr.ib() | |
|
152 | # WSGI environment dict, unmodified. | |||
|
153 | rawenv = attr.ib() | |||
152 |
|
154 | |||
153 | def parserequestfromenv(env, bodyfh, reponame=None, altbaseurl=None): |
|
155 | def parserequestfromenv(env, bodyfh, reponame=None, altbaseurl=None): | |
154 | """Parse URL components from environment variables. |
|
156 | """Parse URL components from environment variables. | |
@@ -342,7 +344,8 b' def parserequestfromenv(env, bodyfh, rep' | |||||
342 | querystring=querystring, |
|
344 | querystring=querystring, | |
343 | qsparams=qsparams, |
|
345 | qsparams=qsparams, | |
344 | headers=headers, |
|
346 | headers=headers, | |
345 |
bodyfh=bodyfh |
|
347 | bodyfh=bodyfh, | |
|
348 | rawenv=env) | |||
346 |
|
349 | |||
347 | class offsettrackingwriter(object): |
|
350 | class offsettrackingwriter(object): | |
348 | """A file object like object that is append only and tracks write count. |
|
351 | """A file object like object that is append only and tracks write count. |
General Comments 0
You need to be logged in to leave comments.
Login now