Show More
@@ -23,6 +23,7 b' from . import (' | |||||
23 | narrowspec, |
|
23 | narrowspec, | |
24 | pycompat, |
|
24 | pycompat, | |
25 | streamclone, |
|
25 | streamclone, | |
|
26 | templatefilters, | |||
26 | util, |
|
27 | util, | |
27 | wireprotoframing, |
|
28 | wireprotoframing, | |
28 | wireprototypes, |
|
29 | wireprototypes, | |
@@ -148,8 +149,6 b' def _processhttpv2reflectrequest(ui, rep' | |||||
148 | tracker. We then dump the log of all that activity back out to the |
|
149 | tracker. We then dump the log of all that activity back out to the | |
149 | client. |
|
150 | client. | |
150 | """ |
|
151 | """ | |
151 | import json |
|
|||
152 |
|
||||
153 | # Reflection APIs have a history of being abused, accidentally disclosing |
|
152 | # Reflection APIs have a history of being abused, accidentally disclosing | |
154 | # sensitive data, etc. So we have a config knob. |
|
153 | # sensitive data, etc. So we have a config knob. | |
155 | if not ui.configbool('experimental', 'web.api.debugreflect'): |
|
154 | if not ui.configbool('experimental', 'web.api.debugreflect'): | |
@@ -175,12 +174,11 b' def _processhttpv2reflectrequest(ui, rep' | |||||
175 | frame.payload)) |
|
174 | frame.payload)) | |
176 |
|
175 | |||
177 | action, meta = reactor.onframerecv(frame) |
|
176 | action, meta = reactor.onframerecv(frame) | |
178 |
states.append(json |
|
177 | states.append(templatefilters.json((action, meta))) | |
179 | separators=(', ', ': '))) |
|
|||
180 |
|
178 | |||
181 | action, meta = reactor.oninputeof() |
|
179 | action, meta = reactor.oninputeof() | |
182 | meta['action'] = action |
|
180 | meta['action'] = action | |
183 | states.append(json.dumps(meta, sort_keys=True, separators=(', ',': '))) |
|
181 | states.append(templatefilters.json(meta)) | |
184 |
|
182 | |||
185 | res.status = b'200 OK' |
|
183 | res.status = b'200 OK' | |
186 | res.headers[b'Content-Type'] = b'text/plain' |
|
184 | res.headers[b'Content-Type'] = b'text/plain' |
General Comments 0
You need to be logged in to leave comments.
Login now