httpdbg 1.2.2__tar.gz → 1.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {httpdbg-1.2.2 → httpdbg-1.2.4}/PKG-INFO +1 -1
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/__init__.py +1 -1
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/initiator.py +8 -5
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/records.py +7 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/api.py +1 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/index.htm +16 -11
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/table.css +1 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg.egg-info/PKG-INFO +1 -1
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_api.py +13 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_initiator.py +12 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/LICENSE +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/README.md +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/__main__.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/args.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/env.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/exception.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/__init__.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/aiohttp.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/all.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/external.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/fastapi.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/flask.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/generic.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/http.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/httpx.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/pytest.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/requests.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/socket.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/starlette.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/template_sitecustomize.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/unittest.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/urllib3.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/utils.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/hooks/uvicorn.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/log.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/mode_console.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/mode_module.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/mode_script.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/preview.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/server.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/utils.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/__init__.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/app.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/api.js +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/column.css +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/configuration.css +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/configuration.js +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/detail.css +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/favicon.ico +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/filter.js +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/chevron-direction-top-outline-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/download-install-line-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/engine-gears-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/eye-blind-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/eye-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/files-papers-outline-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/filter-outline-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/information-mark-circle-outline-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/lock-line-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/lock-open-line-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/math-multiplication-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/push-pin-green-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/question-mark-round-line-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/recycle-bin-line-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/wait-sandclock-icon.svg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/main.js +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/mustache.min.js +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/render.js +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/style.css +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg.egg-info/SOURCES.txt +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg.egg-info/dependency_links.txt +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg.egg-info/entry_points.txt +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg.egg-info/top_level.txt +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/pyproject.toml +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/setup.cfg +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_cli.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_context_manager.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_hook_aiohttp.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_hook_httpx.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_hook_pytest.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_hook_requests.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_hook_unittest.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_hook_urllib3.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_mode_console.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_mode_module_pytest.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_mode_script.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_multiprocess.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_preview.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_pyhttpdbg_server.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_server.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_server_hook_fastapi.py +0 -0
- {httpdbg-1.2.2 → httpdbg-1.2.4}/tests/test_server_hook_flask.py +0 -0
|
@@ -205,11 +205,14 @@ def extract_short_stack_from_file(
|
|
|
205
205
|
|
|
206
206
|
def construct_call_str(original_method, *args, **kwargs):
|
|
207
207
|
|
|
208
|
-
def print_v(v):
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
208
|
+
def print_v(v) -> str:
|
|
209
|
+
try:
|
|
210
|
+
if isinstance(v, str):
|
|
211
|
+
return f'"{v}"'
|
|
212
|
+
else:
|
|
213
|
+
return str(v)
|
|
214
|
+
except Exception:
|
|
215
|
+
return "-?-" # in case __retr__ or __str__ is broken
|
|
213
216
|
|
|
214
217
|
callargs = getcallargs(original_method, *args, **kwargs)
|
|
215
218
|
|
|
@@ -307,6 +307,13 @@ class HTTPRecord:
|
|
|
307
307
|
else:
|
|
308
308
|
self.response.rawdata += data
|
|
309
309
|
|
|
310
|
+
@property
|
|
311
|
+
def protocol(self) -> str:
|
|
312
|
+
if self.response.protocol == self.request.protocol:
|
|
313
|
+
return self.request.protocol
|
|
314
|
+
else:
|
|
315
|
+
return f"{self.request.protocol} -> {self.response.protocol}"
|
|
316
|
+
|
|
310
317
|
|
|
311
318
|
class HTTPRecordsSessionInfo:
|
|
312
319
|
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
data-group="{{group_id}}"
|
|
202
202
|
data-groupby="{{groupby_id}}"
|
|
203
203
|
data-orderby="{{tbegin}}"
|
|
204
|
-
onclick="select_request(
|
|
204
|
+
onclick="select_request(event, '{{id}}')"
|
|
205
205
|
onkeypress="shortcut_request(event, '{{id}}')"
|
|
206
206
|
class="request"
|
|
207
207
|
data-qa-request="{{id}}">
|
|
@@ -273,19 +273,24 @@
|
|
|
273
273
|
<script id="template_headers" type="x-tmpl-mustache">
|
|
274
274
|
<b>{{ method }}</b> <a href="{{ url }}">{{ url }}</a>
|
|
275
275
|
<hr>
|
|
276
|
-
<span class="header-cookie-key">status
|
|
276
|
+
<span class="header-cookie-key">status:</span>
|
|
277
277
|
<span class="header-cookie-value">{{ status_code }} {{ reason }}</span>
|
|
278
|
+
<br>
|
|
279
|
+
{{#protocol}}
|
|
280
|
+
<span class="header-cookie-key">protocol:</span>
|
|
281
|
+
<span class="header-cookie-value">{{ protocol }}</span>
|
|
282
|
+
{{/protocol}}
|
|
278
283
|
<br><br>
|
|
279
|
-
<span class="header-cookie-key">start
|
|
280
|
-
<span class="header-cookie-value">{{tbegin}}</span>
|
|
284
|
+
<span class="header-cookie-key">start:</span>
|
|
285
|
+
<span class="header-cookie-value">{{tbegin}}</span>
|
|
281
286
|
<br>
|
|
282
|
-
<span class="header-cookie-key">end
|
|
283
|
-
<span class="header-cookie-value">{{last_update}}</span>
|
|
287
|
+
<span class="header-cookie-key">end: </span>
|
|
288
|
+
<span class="header-cookie-value">{{last_update}}</span>
|
|
284
289
|
<hr>
|
|
285
290
|
<h4>response headers</h4>
|
|
286
291
|
{{#response}}
|
|
287
292
|
{{#response.headers}}
|
|
288
|
-
<span class="header-cookie-key">{{name}}
|
|
293
|
+
<span class="header-cookie-key">{{name}}:</span>
|
|
289
294
|
<span class="header-cookie-value">{{value}}</span>
|
|
290
295
|
<br>
|
|
291
296
|
{{/response.headers}}
|
|
@@ -293,7 +298,7 @@
|
|
|
293
298
|
<hr>
|
|
294
299
|
<h4>request headers</h4>
|
|
295
300
|
{{#request.headers}}
|
|
296
|
-
<span class="header-cookie-key">{{name}}
|
|
301
|
+
<span class="header-cookie-key">{{name}}:</span>
|
|
297
302
|
<span class="header-cookie-value">{{value}}</span>
|
|
298
303
|
<br>
|
|
299
304
|
{{/request.headers}}
|
|
@@ -309,12 +314,12 @@
|
|
|
309
314
|
<h4>response cookies</h4>
|
|
310
315
|
{{#response}}
|
|
311
316
|
{{#response.cookies}}
|
|
312
|
-
<span class="header-cookie-key">{{name}}
|
|
317
|
+
<span class="header-cookie-key">{{name}}:</span>
|
|
313
318
|
<span class="header-cookie-value">{{value}}</span>
|
|
314
319
|
<ul>
|
|
315
320
|
{{#attributes}}
|
|
316
321
|
<li>
|
|
317
|
-
<span class="header-cookie-key">{{name}}
|
|
322
|
+
<span class="header-cookie-key">{{name}}:</span>{{#attr}} <span class="header-cookie-value">{{attr}}</span>{{/attr}}
|
|
318
323
|
</li>
|
|
319
324
|
{{/attributes}}
|
|
320
325
|
</ul>
|
|
@@ -323,7 +328,7 @@
|
|
|
323
328
|
<hr>
|
|
324
329
|
<h4>request cookies</h4>
|
|
325
330
|
{{#request.cookies}}
|
|
326
|
-
<span class="header-cookie-key">{{name}}
|
|
331
|
+
<span class="header-cookie-key">{{name}}:</span>
|
|
327
332
|
<span class="header-cookie-value">{{value}}</span>
|
|
328
333
|
<br>
|
|
329
334
|
<br>
|
|
@@ -55,6 +55,19 @@ def test_api_requests_netloc(httpbin, httpdbg_host, httpdbg_port):
|
|
|
55
55
|
assert reqs[list(reqs.keys())[0]]["urlext"] == "/get?abc"
|
|
56
56
|
|
|
57
57
|
|
|
58
|
+
@pytest.mark.api
|
|
59
|
+
def test_api_requests_protocol(httpbin, httpdbg_host, httpdbg_port):
|
|
60
|
+
with httpdbg_srv(httpdbg_host, httpdbg_port) as records:
|
|
61
|
+
with httprecord(records):
|
|
62
|
+
requests.get(httpbin.url + "/get?abc")
|
|
63
|
+
ret = requests.get(f"http://{httpdbg_host}:{httpdbg_port}/requests")
|
|
64
|
+
|
|
65
|
+
reqs = ret.json()["requests"]
|
|
66
|
+
|
|
67
|
+
assert len(reqs) == 1
|
|
68
|
+
assert reqs[list(reqs.keys())[0]]["protocol"] == "HTTP/1.1"
|
|
69
|
+
|
|
70
|
+
|
|
58
71
|
@pytest.mark.api
|
|
59
72
|
def test_api_request_by_id(httpbin, httpdbg_host, httpdbg_port):
|
|
60
73
|
with httpdbg_srv(httpdbg_host, httpdbg_port) as records:
|
|
@@ -165,3 +165,15 @@ def test_initiator_add_package_fnc(httpbin):
|
|
|
165
165
|
== "requests.get(url) # method"
|
|
166
166
|
)
|
|
167
167
|
assert records.initiators[records[4].initiator_id].label == "await client.get(url)"
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def test_exception_in_initiator(httpbin):
|
|
171
|
+
|
|
172
|
+
with httprecord(initiators=["tests.initiator_pck"]) as records:
|
|
173
|
+
from tests.initiator_pck.repr_exception import BrokenREPR, get
|
|
174
|
+
|
|
175
|
+
br = BrokenREPR(f"{httpbin.url}/get")
|
|
176
|
+
get(br)
|
|
177
|
+
|
|
178
|
+
assert records.initiators[records[0].initiator_id].label == "get(br)"
|
|
179
|
+
assert "br=-?-" in records.initiators[records[0].initiator_id].short_stack
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/chevron-direction-top-outline-icon.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/information-mark-circle-outline-icon.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{httpdbg-1.2.2 → httpdbg-1.2.4}/httpdbg/webapp/static/icons/question-mark-round-line-icon.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|