forked from tarantool/tarantool
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app/uri: add url encode and decode methods
Lua FFI bindings of curl_easy_escape() [1] and curl_easy_unescape() [2]. 1. https://curl.se/libcurl/c/curl_easy_escape.html 2. https://curl.se/libcurl/c/curl_easy_unescape.html @TarantoolBot document Title: Document a new methods to encode and decode URL's New methods "uri:encode()" and "uri:decode()" have been introduced. First one allows to escape symbols in a string and second one to unescape symbols in a string. Escaping and unescaping symbols implemented using CURL functions curl_easy_escape() and curl_easy_unescape() and conforms to RFC 3986. Maximum length of string is limited with CURL_MAX_INPUT_LENGTH (8 MB). ``` tarantool> require('uri').encode('тарантул') --- - '%D1%82%D0%B0%D1%80%D0%B0%D0%BD%D1%82%D1%83%D0%BB' ... tarantool> ``` Fixes tarantool#3682
- Loading branch information
Showing
3 changed files
with
164 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## feature/lua/uri | ||
|
||
* Added functions for encoding and decoding URL string according to | ||
(gh-3682). | ||
|
||
```lua | ||
tarantool> require('uri').encode('тарантул') | ||
--- | ||
- '%D1%82%D0%B0%D1%80%D0%B0%D0%BD%D1%82%D1%83%D0%BB' | ||
... | ||
|
||
tarantool | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters