Currently, handling of URI escapes is ad-hoc; escaped strings are stored as-is in the URI structure, and it is up to the individual protocol to unescape as necessary. This is error-prone and expensive in terms of code size. Modify this behavior by unescaping in parse_uri() and escaping in unparse_uri() those fields that typically handle URI escapes (hostname, user, password, path, query, fragment), and allowing unparse_uri() to accept a subset of fields to print so it can be easily used to generate e.g. the escaped HTTP path?query request. Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Signed-off-by: Marty Connor <mdc@etherboot.org>tags/v1.0.0-rc1
|
|
||
1085 |
|
1085 |
|
1086 |
|
1086 |
|
1087 |
|
1087 |
|
1088 |
|
|
|
|
1088 |
|
|
1089 |
|
1089 |
|
1090 |
|
1090 |
|
1091 |
|
1091 |
|
|
|
||
76 |
|
76 |
|
77 |
|
77 |
|
78 |
|
78 |
|
|
79 |
|
|
79 |
|
80 |
|
80 |
|
81 |
|
81 |
|
82 |
|
|
|
||
171 |
|
172 |
|
172 |
|
173 |
|
173 |
|
174 |
|
|
175 |
|
|
|
176 |
|
|
|
177 |
|
|
|
178 |
|
|
|
179 |
|
|
|
180 |
|
|
|
181 |
|
|
|
182 |
|
|
174 |
|
183 |
|
175 |
|
184 |
|
176 |
|
185 |
|
|
|
||
198 |
|
207 |
|
199 |
|
208 |
|
200 |
|
209 |
|
|
210 |
|
|
201 |
|
211 |
|
202 |
|
212 |
|
203 |
|
|
|
|
213 |
|
|
|
214 |
|
|
|
215 |
|
|
|
216 |
|
|
|
217 |
|
|
|
218 |
|
|
|
219 |
|
|
|
220 |
|
|
204 |
|
221 |
|
|
222 |
|
|
205 |
|
223 |
|
206 |
|
224 |
|
207 |
|
225 |
|
|
|
||
214 |
|
232 |
|
215 |
|
233 |
|
216 |
|
234 |
|
217 |
|
|
|
218 |
|
|
|
219 |
|
|
|
220 |
|
|
|
221 |
|
|
|
222 |
|
|
|
223 |
|
|
|
224 |
|
|
|
225 |
|
|
|
226 |
|
|
|
227 |
|
|
|
228 |
|
|
|
229 |
|
|
|
230 |
|
|
|
231 |
|
|
|
232 |
|
|
|
233 |
|
|
|
234 |
|
|
|
235 |
|
|
|
236 |
|
|
|
237 |
|
|
|
|
235 |
|
|
|
236 |
|
|
|
237 |
|
|
|
238 |
|
|
|
239 |
|
|
|
240 |
|
|
|
241 |
|
|
|
242 |
|
|
|
243 |
|
|
|
244 |
|
|
|
245 |
|
|
|
246 |
|
|
|
247 |
|
|
|
248 |
|
|
|
249 |
|
|
|
250 |
|
|
|
251 |
|
|
|
252 |
|
|
238 |
|
253 |
|
239 |
|
|
|
240 |
|
|
|
241 |
|
|
|
242 |
|
|
|
243 |
|
|
|
244 |
|
|
|
245 |
|
|
|
246 |
|
|
|
247 |
|
|
|
248 |
|
|
|
249 |
|
|
|
250 |
|
|
|
251 |
|
|
|
252 |
|
|
|
253 |
|
|
|
254 |
|
|
|
255 |
|
254 |
|
256 |
|
|
|
257 |
|
|
|
258 |
|
|
|
259 |
|
|
|
260 |
|
|
|
261 |
|
|
|
262 |
|
|
|
263 |
|
|
|
264 |
|
|
|
265 |
|
|
|
|
255 |
|
|
|
256 |
|
|
|
257 |
|
|
|
258 |
|
|
|
259 |
|
|
|
260 |
|
|
|
261 |
|
|
|
262 |
|
|
|
263 |
|
|
|
264 |
|
|
|
265 |
|
|
|
266 |
|
|
|
267 |
|
|
266 |
|
268 |
|
267 |
|
269 |
|
268 |
|
270 |
|
|
|
||
277 |
|
279 |
|
278 |
|
280 |
|
279 |
|
281 |
|
280 |
|
|
|
|
282 |
|
|
281 |
|
283 |
|
282 |
|
284 |
|
283 |
|
|
|
|
285 |
|
|
284 |
|
286 |
|
285 |
|
287 |
|
286 |
|
288 |
|
|
|
||
393 |
|
395 |
|
394 |
|
396 |
|
395 |
|
397 |
|
|
398 |
|
|
396 |
|
399 |
|
397 |
|
400 |
|
398 |
|
|
|
|
401 |
|
|
399 |
|
402 |
|
400 |
|
403 |
|
401 |
|
404 |
|
|
405 |
|
|
|
406 |
|
|
|
407 |
|
|
402 |
|
408 |
|
403 |
|
|
|
404 |
|
|
|
405 |
|
|
|
|
409 |
|
|
|
410 |
|
|
|
411 |
|
|
|
412 |
|
|
|
413 |
|
|
|
414 |
|
|
|
415 |
|
|
|
416 |
|
|
|
417 |
|
|
|
418 |
|
|
|
419 |
|
|
|
420 |
|
|
|
421 |
|
|
|
422 |
|
|
406 |
|
423 |
|
407 |
|
424 |
|
408 |
|
425 |
|
|
|
||
411 |
|
428 |
|
412 |
|
429 |
|
413 |
|
430 |
|
|
431 |
|
|
414 |
|
432 |
|
415 |
|
433 |
|
416 |
|
|
|
|
434 |
|
|
|
435 |
|
|
417 |
|
436 |
|
418 |
|
437 |
|
419 |
|
438 |
|
420 |
|
439 |
|
421 |
|
|
|
|
440 |
|
|
422 |
|
441 |
|
423 |
|
442 |
|
424 |
|
443 |
|
425 |
|
|
|
|
444 |
|
|
426 |
|
445 |
|
427 |
|
446 |
|
428 |
|
447 |
|
|
|
||
441 |
|
460 |
|
442 |
|
461 |
|
443 |
|
462 |
|
|
463 |
|
|
|
464 |
|
|
|
465 |
|
|
444 |
|
466 |
|
445 |
|
|
|
446 |
|
|
|
|
467 |
|
|
|
468 |
|
|
447 |
|
469 |
|
448 |
|
470 |
|
449 |
|
471 |
|
450 |
|
472 |
|
451 |
|
|
|
452 |
|
|
|
453 |
|
|
|
454 |
|
|
|
|
473 |
|
|
455 |
|
474 |
|
456 |
|
475 |
|
457 |
|
476 |
|
|
|
||
461 |
|
480 |
|
462 |
|
481 |
|
463 |
|
482 |
|
464 |
|
|
|
|
483 |
|
|
|
484 |
|
|
465 |
|
485 |
|
|
486 |
|
|
|
487 |
|
|
|
488 |
|
|
|
489 |
|
|
466 |
|
490 |
|
467 |
|
491 |
|
|
|
||
20 |
|
20 |
|
21 |
|
21 |
|
22 |
|
22 |
|
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
23 |
|
27 |
|
24 |
|
28 |
|
25 |
|
29 |
|
|
|
||
61 |
|
65 |
|
62 |
|
66 |
|
63 |
|
67 |
|
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
64 |
|
88 |
|
65 |
|
89 |
|
|
90 |
|
|
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
|
97 |
|
|
|
98 |
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
|
|
66 |
|
102 |
|
67 |
|
103 |
|
68 |
|
104 |
|
|
|
||
131 |
|
167 |
|
132 |
|
168 |
|
133 |
|
169 |
|
134 |
|
|
|
|
170 |
|
|
|
171 |
|
|
135 |
|
172 |
|
136 |
|
173 |
|
137 |
|
174 |
|
138 |
|
175 |
|
139 |
|
176 |
|
140 |
|
177 |
|
141 |
|
|
|
142 |
|
|
|
|
178 |
|
|
|
179 |
|
|
|
180 |
|
|
143 |
|
181 |
|
144 |
|
182 |
|
|
|
||
417 |
|
417 |
|
418 |
|
418 |
|
419 |
|
419 |
|
420 |
|
|
|
421 |
|
420 |
|
422 |
|
|
|
423 |
|
421 |
|
424 |
|
422 |
|
425 |
|
423 |
|
|
|
||
429 |
|
427 |
|
430 |
|
428 |
|
431 |
|
429 |
|
|
430 |
|
|
|
431 |
|
|
432 |
|
432 |
|
433 |
|
433 |
|
|
434 |
|
|
|
435 |
|
|
|
436 |
|
|
|
437 |
|
|
|
438 |
|
|
434 |
|
439 |
|
435 |
|
440 |
|
436 |
|
441 |
|
437 |
|
442 |
|
438 |
|
443 |
|
439 |
|
444 |
|
440 |
|
|
|
441 |
|
|
|
442 |
|
|
|
443 |
|
|
|
444 |
|
|
|
445 |
|
|
|
446 |
|
|
|
447 |
|
|
|
448 |
|
|
|
449 |
|
|
|
450 |
|
|
|
451 |
|
|
|
452 |
|
|
|
|
445 |
|
|
|
446 |
|
|
|
447 |
|
|
453 |
|
448 |
|
454 |
|
449 |
|
455 |
|
450 |
|
|
|
||
457 |
|
452 |
|
458 |
|
453 |
|
459 |
|
454 |
|
460 |
|
|
|
|
455 |
|
|
461 |
|
456 |
|
462 |
|
457 |
|
463 |
|
458 |
|
464 |
|
459 |
|
465 |
|
|
|
466 |
|
|
|
467 |
|
|
|
|
460 |
|
|
468 |
|
461 |
|
469 |
|
462 |
|
470 |
|
463 |
|
|
|
||
22 |
|
22 |
|
23 |
|
23 |
|
24 |
|
24 |
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
25 |
|
28 |
|
26 |
|
29 |
|
27 |
|
30 |
|
|
|
||
41 |
|
44 |
|
42 |
|
45 |
|
43 |
|
46 |
|
44 |
|
|
|
|
47 |
|
|
45 |
|
48 |
|
46 |
|
49 |
|
47 |
|
50 |
|
|
|
||
92 |
|
95 |
|
93 |
|
96 |
|
94 |
|
97 |
|
95 |
|
|
|
|
98 |
|
|
96 |
|
99 |
|
97 |
|
100 |
|
98 |
|
101 |
|
|
|
||
61 |
|
61 |
|
62 |
|
62 |
|
63 |
|
63 |
|
64 |
|
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
65 |
|
67 |
|
66 |
|
68 |
|
67 |
|
69 |
|
|
|
||
78 |
|
80 |
|
79 |
|
81 |
|
80 |
|
82 |
|
81 |
|
|
|
82 |
|
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
83 |
|
87 |
|
84 |
|
88 |
|
85 |
|
89 |
|
|
|
||
61 |
|
61 |
|
62 |
|
62 |
|
63 |
|
63 |
|
64 |
|
|
|
|
64 |
|
|
65 |
|
65 |
|
66 |
|
66 |
|
67 |
|
67 |
|