uri: implement ability to parse URI query paramters
Previously, the part of the URI string that comes after the first '?' was saved as a single unit in the field `query` as a part of `struct uri`. Now an array of URI paramters has been added to the uri structure, and query is subjected to the additional parsing and URI query parameters are extracted from it. The separator symbol between URI query parameters is '&', the separator symbol between parameter and it's value is '='. For example URI = "/tmp/unix.sock?q1=v11&q1=v12&q2=v2" has two parameters: parameter 'q1' with two values 'v11' and 'v12' and parameter 'q2' with value 'v2'. Part of #5928 Closes #1175
Showing
- src/lib/uri/uri.c 136 additions, 0 deletionssrc/lib/uri/uri.c
- src/lib/uri/uri.h 24 additions, 1 deletionsrc/lib/uri/uri.h
- src/lua/uri.lua 18 additions, 0 deletionssrc/lua/uri.lua
- test/app-tap/uri.test.lua 51 additions, 1 deletiontest/app-tap/uri.test.lua
- test/unit/CMakeLists.txt 2 additions, 0 deletionstest/unit/CMakeLists.txt
- test/unit/uri.c 263 additions, 0 deletionstest/unit/uri.c
- test/unit/uri.result 113 additions, 0 deletionstest/unit/uri.result
Loading
Please register or sign in to comment