WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit e19615d

Browse files
jacobmealeybagder
authored andcommitted
add tests cases from open issues
To verify use of null bytes in URLs
1 parent d801161 commit e19615d

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

tests.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,5 +2355,73 @@
23552355
"stderr": "trurl note: key 'key' not in url, appending to query\n",
23562356
"returncode": 0
23572357
}
2358+
},
2359+
{
2360+
"input": {
2361+
"arguments": [
2362+
"0?00%000000000000000000000=0000000000"
2363+
]
2364+
},
2365+
"expected": {
2366+
"stdout": "http://0.0.0.0/?00%000000000000000000000=0000000000\n",
2367+
"stderr": "",
2368+
"returncode": 0
2369+
}
2370+
},
2371+
{
2372+
"input": {
2373+
"arguments": [
2374+
"--json",
2375+
"0?0%000000000000000000000000000000000"
2376+
]
2377+
},
2378+
"expected": {
2379+
"returncode": 0,
2380+
"stderr": "",
2381+
"stdout": [
2382+
{
2383+
"url": "http://0.0.0.0/?0%000000000000000000000000000000000",
2384+
"parts": {
2385+
"scheme": "http",
2386+
"host": "0.0.0.0",
2387+
"path": "/"
2388+
},
2389+
"params": [
2390+
{
2391+
"key": "0\u00000000000000000000000000000000000",
2392+
"value": ""
2393+
}
2394+
]
2395+
}
2396+
]
2397+
}
2398+
},
2399+
{
2400+
"input": {
2401+
"arguments": [
2402+
"--json",
2403+
"0?0%000000000000000000000000000000000=000%0000000000"
2404+
]
2405+
},
2406+
"expected": {
2407+
"returncode": 0,
2408+
"stderr": "",
2409+
"stdout": [
2410+
{
2411+
"url": "http://0.0.0.0/?0%000000000000000000000000000000000=000%0000000000",
2412+
"parts": {
2413+
"scheme": "http",
2414+
"host": "0.0.0.0",
2415+
"path": "/"
2416+
},
2417+
"params": [
2418+
{
2419+
"key": "0\u00000000000000000000000000000000000",
2420+
"value": "000\u000000000000"
2421+
}
2422+
]
2423+
}
2424+
]
2425+
}
23582426
}
23592427
]

0 commit comments

Comments
 (0)