httpdbg 2.1.1__tar.gz → 2.1.3__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-2.1.1 → httpdbg-2.1.3}/PKG-INFO +1 -1
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/__init__.py +1 -1
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/export.py +1 -0
- httpdbg-2.1.3/httpdbg/webapp/static/api.js +182 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/index.htm +0 -1
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/render.js +1 -7
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg.egg-info/PKG-INFO +1 -1
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg.egg-info/SOURCES.txt +0 -1
- httpdbg-2.1.1/httpdbg/webapp/static/api.js +0 -175
- httpdbg-2.1.1/httpdbg/webapp/static/icons/information-mark-circle-outline-icon.svg +0 -1
- {httpdbg-2.1.1 → httpdbg-2.1.3}/LICENSE +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/README.md +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/__main__.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/args.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/env.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/exception.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/__init__.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/aiohttp.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/all.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/external.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/fastapi.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/flask.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/generic.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/h2.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/http.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/httpx.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/pytest.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/record.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/recordhttp1.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/recordhttp2.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/requests.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/socket.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/starlette.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/template_sitecustomize.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/unittest.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/urllib3.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/utils.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/hooks/uvicorn.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/http_status_code.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/initiator.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/log.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/mode_console.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/mode_module.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/mode_script.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/preview.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/records.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/server.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/utils.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/__init__.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/api.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/app.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/column.css +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/configuration.css +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/configuration.js +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/detail.css +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/favicon.ico +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/filter.js +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/chevron-direction-top-outline-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/download-install-line-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/engine-gears-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/eye-blind-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/eye-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/files-papers-outline-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/filter-outline-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/lock-line-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/lock-open-line-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/math-multiplication-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/push-pin-green-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/question-mark-round-line-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/recycle-bin-line-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/icons/wait-sandclock-icon.svg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/main.js +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/mustache.min.js +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/style.css +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg/webapp/static/table.css +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg.egg-info/dependency_links.txt +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg.egg-info/entry_points.txt +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/httpdbg.egg-info/top_level.txt +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/pyproject.toml +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/setup.cfg +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_api.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_cli.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_context_manager.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_hook_aiohttp.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_hook_h2.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_hook_httpx.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_hook_pytest.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_hook_requests.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_hook_unittest.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_hook_urllib3.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_initiator.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_mode_console.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_mode_module_pytest.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_mode_script.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_multiprocess.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_preview.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_pyhttpdbg_server.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_server.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_server_hook_fastapi.py +0 -0
- {httpdbg-2.1.1 → httpdbg-2.1.3}/tests/test_server_hook_flask.py +0 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const global = {
|
|
4
|
+
session: null,
|
|
5
|
+
sessions: {},
|
|
6
|
+
requests: {},
|
|
7
|
+
initiators: {},
|
|
8
|
+
groups: {},
|
|
9
|
+
connected: false,
|
|
10
|
+
group_collapse: [],
|
|
11
|
+
groupby: "default"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function save_request(request_id, request, session_id) {
|
|
15
|
+
const initiator = global.initiators[request.initiator_id] ?? null;
|
|
16
|
+
if (initiator !== null) { // the initiator may be missing if the clean list is executed in parrallel
|
|
17
|
+
request.loaded = false;
|
|
18
|
+
request.to_refresh = true;
|
|
19
|
+
if (request.pin == undefined) {
|
|
20
|
+
request.pin = "";
|
|
21
|
+
}
|
|
22
|
+
if (request.filter == undefined) {
|
|
23
|
+
request.filter = "---";
|
|
24
|
+
}
|
|
25
|
+
request.session_id = session_id;
|
|
26
|
+
request.initiator = initiator;
|
|
27
|
+
|
|
28
|
+
if (request.in_progress) {
|
|
29
|
+
request.status_code_view = '<svg class="icon" alt="loading"><use href="#wait-sandclock-icon"></use></svg>';
|
|
30
|
+
} else {
|
|
31
|
+
switch (request.status_code) {
|
|
32
|
+
case 0:
|
|
33
|
+
request.status_code_view = '<svg class="icon" alt="loading"><use href="#wait-sandclock-icon"></use></svg>';
|
|
34
|
+
break;
|
|
35
|
+
case -1:
|
|
36
|
+
request.status_code_view = '<svg class="icon" alt="load failed"><use href="#math-multiplication-icon"></use></svg>';
|
|
37
|
+
break;
|
|
38
|
+
default:
|
|
39
|
+
request.status_code_view = request.status_code;
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
global.requests[request_id] = request;
|
|
45
|
+
|
|
46
|
+
if (!request.pin) {
|
|
47
|
+
get_request(request_id);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async function load_all_requests() {
|
|
53
|
+
// export mode
|
|
54
|
+
if (typeof global.static_all_requests !== "undefined") {
|
|
55
|
+
global.connected = false;
|
|
56
|
+
return global.static_all_requests;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// connected mode
|
|
60
|
+
var requests_already_loaded = 0
|
|
61
|
+
for (const [request_id, request] of Object.entries(global.requests)) {
|
|
62
|
+
if (request.loaded && (global.session == request.session_id)) {
|
|
63
|
+
requests_already_loaded += 1;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
var url = "/requests?" + new URLSearchParams({
|
|
67
|
+
"id": global.session,
|
|
68
|
+
"requests_already_loaded": requests_already_loaded,
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
try {
|
|
72
|
+
const res = await fetch(url);
|
|
73
|
+
const data = await res.json();
|
|
74
|
+
global.connected = true;
|
|
75
|
+
return data;
|
|
76
|
+
} catch (error) {
|
|
77
|
+
global.connected = false;
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
async function get_all_requests() {
|
|
84
|
+
|
|
85
|
+
const data = await load_all_requests();
|
|
86
|
+
|
|
87
|
+
if (data) {
|
|
88
|
+
if (data.session.id != global.session) {
|
|
89
|
+
clean();
|
|
90
|
+
global.session = data.session.id;
|
|
91
|
+
global.sessions[data.session.id] = data.session;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// for the initiators and the groups, we can just save them without any verification
|
|
95
|
+
Object.assign(global.initiators, data.initiators);
|
|
96
|
+
Object.assign(global.groups, data.groups);
|
|
97
|
+
|
|
98
|
+
// for the requests, we may have to update them
|
|
99
|
+
for (const [request_id, request] of Object.entries(data.requests)) {
|
|
100
|
+
if (!(request_id in global.requests)) {
|
|
101
|
+
// this is a new request
|
|
102
|
+
save_request(request_id, request, data.session.id);
|
|
103
|
+
} else {
|
|
104
|
+
if (global.requests[request_id].last_update < request.last_update) {
|
|
105
|
+
// this request has been updated (probably a "big" file)
|
|
106
|
+
save_request(request_id, request, data.session.id);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
async function load_request(request_id) {
|
|
114
|
+
if (typeof global.static_requests !== "undefined") {
|
|
115
|
+
global.connected = false;
|
|
116
|
+
return global.static_requests[request_id];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
try {
|
|
120
|
+
const res = await fetch("/request/" + request_id);
|
|
121
|
+
const data = await res.json();
|
|
122
|
+
global.connected = true;
|
|
123
|
+
return data;
|
|
124
|
+
} catch (error) {
|
|
125
|
+
global.connected = false;
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
async function get_request(request_id) {
|
|
131
|
+
const data = await load_request(request_id);
|
|
132
|
+
|
|
133
|
+
if (data) {
|
|
134
|
+
global.requests[request_id].filter = prepare_for_filter(global.requests[request_id].url);
|
|
135
|
+
|
|
136
|
+
global.requests[request_id].request = data.request;
|
|
137
|
+
if (data.request.body && data.request.body.text) {
|
|
138
|
+
global.requests[request_id].filter += " " + prepare_for_filter(
|
|
139
|
+
parse_raw_text(
|
|
140
|
+
data.request.body.text,
|
|
141
|
+
data.request.body.content_type
|
|
142
|
+
) || data.request.body.text
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
global.requests[request_id].response = data.response;
|
|
147
|
+
if (data.response.body && data.response.body.text) {
|
|
148
|
+
global.requests[request_id].filter += " " + prepare_for_filter(
|
|
149
|
+
parse_raw_text(
|
|
150
|
+
data.response.body.text,
|
|
151
|
+
data.response.body.content_type
|
|
152
|
+
) || data.response.body.text
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// the full stack is not present in request summary
|
|
157
|
+
global.requests[request_id].initiator_id = data.initiator_id;
|
|
158
|
+
global.requests[request_id].exception = data.exception;
|
|
159
|
+
|
|
160
|
+
global.requests[request_id].to_refresh = true;
|
|
161
|
+
|
|
162
|
+
global.requests[request_id].loaded = true;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
async function pol_new_data() {
|
|
167
|
+
|
|
168
|
+
while (true) {
|
|
169
|
+
await Promise.all([
|
|
170
|
+
get_all_requests(),
|
|
171
|
+
wait_for(1000)
|
|
172
|
+
]);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function pin_request(request_id, pin) {
|
|
177
|
+
if (pin) {
|
|
178
|
+
global.requests[request_id].pin = "checked";
|
|
179
|
+
} else {
|
|
180
|
+
global.requests[request_id].pin = "";
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -377,7 +377,6 @@
|
|
|
377
377
|
{{#body}}
|
|
378
378
|
{{#body.path}}
|
|
379
379
|
<a href="{{body.path}}" download="{{body.filename}}" class="need-server"><button title="download"><svg class="icon"><use href="#download-install-line-icon"></use></svg></button></a>
|
|
380
|
-
<svg class="icon need-server-info"><use href="#information-mark-circle-outline-icon"></use></svg>
|
|
381
380
|
{{/body.path}}
|
|
382
381
|
|
|
383
382
|
{{#body.text}}
|
|
@@ -7,7 +7,7 @@ async function refresh_resquests() {
|
|
|
7
7
|
var template_request = document.getElementById("template_request").innerHTML;
|
|
8
8
|
var template_group = document.getElementById("template_group").innerHTML;
|
|
9
9
|
|
|
10
|
-
if (global.session
|
|
10
|
+
if (session_id != null && global.session !== session_id) {
|
|
11
11
|
clean();
|
|
12
12
|
};
|
|
13
13
|
session_id = global.session;
|
|
@@ -260,7 +260,6 @@ async function disable_link_if_server_disconnected() {
|
|
|
260
260
|
|
|
261
261
|
if (global.connected) {
|
|
262
262
|
sheet.insertRule(".need-server {}");
|
|
263
|
-
sheet.insertRule(".need-server-info {display: none;}");
|
|
264
263
|
} else {
|
|
265
264
|
sheet.insertRule(".need-server {\
|
|
266
265
|
color: var(--link-server-disconnected);\
|
|
@@ -268,11 +267,6 @@ async function disable_link_if_server_disconnected() {
|
|
|
268
267
|
opacity: 0.5;\
|
|
269
268
|
text-decoration: none;\
|
|
270
269
|
}");
|
|
271
|
-
sheet.insertRule(".need-server-info {\
|
|
272
|
-
display: inline;\
|
|
273
|
-
color: var(--link-server-disconnected);\
|
|
274
|
-
opacity: 0.5;\
|
|
275
|
-
}");
|
|
276
270
|
}
|
|
277
271
|
}
|
|
278
272
|
|
|
@@ -68,7 +68,6 @@ httpdbg/webapp/static/icons/eye-blind-icon.svg
|
|
|
68
68
|
httpdbg/webapp/static/icons/eye-icon.svg
|
|
69
69
|
httpdbg/webapp/static/icons/files-papers-outline-icon.svg
|
|
70
70
|
httpdbg/webapp/static/icons/filter-outline-icon.svg
|
|
71
|
-
httpdbg/webapp/static/icons/information-mark-circle-outline-icon.svg
|
|
72
71
|
httpdbg/webapp/static/icons/lock-line-icon.svg
|
|
73
72
|
httpdbg/webapp/static/icons/lock-open-line-icon.svg
|
|
74
73
|
httpdbg/webapp/static/icons/math-multiplication-icon.svg
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const global = {
|
|
4
|
-
session: null,
|
|
5
|
-
sessions: {},
|
|
6
|
-
requests: {},
|
|
7
|
-
initiators: {},
|
|
8
|
-
groups: {},
|
|
9
|
-
connected: false,
|
|
10
|
-
group_collapse: [],
|
|
11
|
-
groupby: "default"
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function save_request(request_id, request, session_id) {
|
|
15
|
-
const initiator = global.initiators[request.initiator_id] ?? null;
|
|
16
|
-
if (initiator !== null) { // the initiator may be missing if the clean list is executed in parrallel
|
|
17
|
-
request.loaded = false;
|
|
18
|
-
request.to_refresh = true;
|
|
19
|
-
if (request.pin == undefined) {
|
|
20
|
-
request.pin = "";
|
|
21
|
-
}
|
|
22
|
-
if (request.filter == undefined) {
|
|
23
|
-
request.filter = "---";
|
|
24
|
-
}
|
|
25
|
-
request.session_id = session_id;
|
|
26
|
-
request.initiator = initiator;
|
|
27
|
-
|
|
28
|
-
if (request.in_progress) {
|
|
29
|
-
request.status_code_view = '<svg class="icon" alt="loading"><use href="#wait-sandclock-icon"></use></svg>';
|
|
30
|
-
} else {
|
|
31
|
-
switch (request.status_code) {
|
|
32
|
-
case 0:
|
|
33
|
-
request.status_code_view = '<svg class="icon" alt="loading"><use href="#wait-sandclock-icon"></use></svg>';
|
|
34
|
-
break;
|
|
35
|
-
case -1:
|
|
36
|
-
request.status_code_view = '<svg class="icon" alt="load failed"><use href="#math-multiplication-icon"></use></svg>';
|
|
37
|
-
break;
|
|
38
|
-
default:
|
|
39
|
-
request.status_code_view = request.status_code;
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
global.requests[request_id] = request;
|
|
45
|
-
|
|
46
|
-
if (!request.pin) {
|
|
47
|
-
get_request(request_id);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
async function load_all_requests() {
|
|
53
|
-
if (typeof global.static_all_requests !== "undefined") {
|
|
54
|
-
return global.static_all_requests;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
var requests_already_loaded = 0
|
|
58
|
-
for (const [request_id, request] of Object.entries(global.requests)) {
|
|
59
|
-
if (request.loaded && (global.session == request.session_id)) {
|
|
60
|
-
requests_already_loaded += 1;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
var url = "/requests?" + new URLSearchParams({
|
|
64
|
-
"id": global.session,
|
|
65
|
-
"requests_already_loaded": requests_already_loaded,
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
const res = await fetch(url);
|
|
69
|
-
const data = await res.json();
|
|
70
|
-
return data;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
async function get_all_requests() {
|
|
75
|
-
|
|
76
|
-
await load_all_requests()
|
|
77
|
-
.then(data => {
|
|
78
|
-
global.connected = true;
|
|
79
|
-
|
|
80
|
-
if (data.session.id != global.session) {
|
|
81
|
-
clean();
|
|
82
|
-
global.session = data.session.id;
|
|
83
|
-
global.sessions[data.session.id] = data.session;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
// for the initiators and the groups, we can just save them without any verification
|
|
87
|
-
Object.assign(global.initiators, data.initiators);
|
|
88
|
-
Object.assign(global.groups, data.groups);
|
|
89
|
-
|
|
90
|
-
// for the requests, we may have to update them
|
|
91
|
-
for (const [request_id, request] of Object.entries(data.requests)) {
|
|
92
|
-
if (!(request_id in global.requests)) {
|
|
93
|
-
// this is a new request
|
|
94
|
-
save_request(request_id, request, data.session.id);
|
|
95
|
-
} else {
|
|
96
|
-
if (global.requests[request_id].last_update < request.last_update) {
|
|
97
|
-
// this request has been updated (probably a "big" file)
|
|
98
|
-
save_request(request_id, request, data.session.id);
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
})
|
|
103
|
-
.catch((error) => {
|
|
104
|
-
global.connected = false;
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
async function load_request(request_id) {
|
|
109
|
-
if (typeof global.static_requests !== "undefined") {
|
|
110
|
-
return global.static_requests[request_id];
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const res = await fetch("/request/" + request_id);
|
|
114
|
-
const data = await res.json();
|
|
115
|
-
return data;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
async function get_request(request_id) {
|
|
119
|
-
|
|
120
|
-
await load_request(request_id)
|
|
121
|
-
.then(data => {
|
|
122
|
-
global.connected = true;
|
|
123
|
-
global.requests[request_id].filter = prepare_for_filter(global.requests[request_id].url);
|
|
124
|
-
|
|
125
|
-
global.requests[request_id].request = data.request;
|
|
126
|
-
if (data.request.body && data.request.body.text) {
|
|
127
|
-
global.requests[request_id].filter += " " + prepare_for_filter(
|
|
128
|
-
parse_raw_text(
|
|
129
|
-
data.request.body.text,
|
|
130
|
-
data.request.body.content_type
|
|
131
|
-
) || data.request.body.text
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
global.requests[request_id].response = data.response;
|
|
136
|
-
if (data.response.body && data.response.body.text) {
|
|
137
|
-
global.requests[request_id].filter += " " + prepare_for_filter(
|
|
138
|
-
parse_raw_text(
|
|
139
|
-
data.response.body.text,
|
|
140
|
-
data.response.body.content_type
|
|
141
|
-
) || data.response.body.text
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// the full stack is not present in request summary
|
|
146
|
-
global.requests[request_id].initiator_id = data.initiator_id;
|
|
147
|
-
global.requests[request_id].exception = data.exception;
|
|
148
|
-
|
|
149
|
-
global.requests[request_id].to_refresh = true;
|
|
150
|
-
|
|
151
|
-
global.requests[request_id].loaded = true;
|
|
152
|
-
})
|
|
153
|
-
.catch((error) => {
|
|
154
|
-
global.connected = false;
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
async function pol_new_data() {
|
|
160
|
-
|
|
161
|
-
while (true) {
|
|
162
|
-
await Promise.all([
|
|
163
|
-
get_all_requests(),
|
|
164
|
-
wait_for(1000)
|
|
165
|
-
]);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function pin_request(request_id, pin) {
|
|
170
|
-
if (pin) {
|
|
171
|
-
global.requests[request_id].pin = "checked";
|
|
172
|
-
} else {
|
|
173
|
-
global.requests[request_id].pin = "";
|
|
174
|
-
}
|
|
175
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 512 512"><path fill-rule="nonzero" d="M256 0c70.69 0 134.7 28.66 181.02 74.98C483.34 121.31 512 185.31 512 256c0 70.69-28.66 134.7-74.98 181.02C390.7 483.34 326.69 512 256 512c-70.69 0-134.7-28.66-181.02-74.98C28.66 390.7 0 326.69 0 256c0-70.69 28.66-134.69 74.98-181.02C121.3 28.66 185.31 0 256 0zm17.75 342.25h29.15v29.32h-93.79v-29.32h28.76v-92.34h-28.76v-29.32h64.64v121.66zm-27.94-150.37c-7.08-.05-13.12-2.53-18.2-7.56-5.08-5.01-7.56-11.11-7.56-18.25 0-7.01 2.48-13.06 7.56-18.08 5.08-5.02 11.12-7.55 18.2-7.55 6.95 0 12.99 2.53 18.08 7.55 5.13 5.02 7.67 11.07 7.67 18.08 0 4.72-1.2 9.07-3.56 12.94-2.36 3.93-5.45 7.07-9.31 9.37-3.87 2.3-8.17 3.45-12.88 3.5zm171.9-97.59C376.33 52.92 319.15 27.32 256 27.32c-63.15 0-120.33 25.6-161.71 66.97C52.92 135.68 27.32 192.85 27.32 256c0 63.15 25.6 120.33 66.97 161.71 41.38 41.37 98.56 66.97 161.71 66.97 63.15 0 120.33-25.6 161.71-66.97 41.37-41.38 66.97-98.56 66.97-161.71 0-63.15-25.6-120.32-66.97-161.71z"/></svg>
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{httpdbg-2.1.1 → httpdbg-2.1.3}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{httpdbg-2.1.1 → httpdbg-2.1.3}/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
|
|
File without changes
|
|
File without changes
|