Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
364acc89
Commit
364acc89
authored
Oct 15, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/curl/Escape: add CurlUnescape()
parent
a8f4d2b6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
Escape.cxx
src/lib/curl/Escape.cxx
+16
-0
Escape.hxx
src/lib/curl/Escape.hxx
+6
-0
No files found.
src/lib/curl/Escape.cxx
View file @
364acc89
...
...
@@ -53,3 +53,19 @@ CurlEscapeUriPath(StringView src) noexcept
CurlEasy
easy
;
return
CurlEscapeUriPath
(
easy
.
Get
(),
src
);
}
std
::
string
CurlUnescape
(
CURL
*
curl
,
StringView
src
)
noexcept
{
int
outlength
;
CurlString
tmp
(
curl_easy_unescape
(
curl
,
src
.
data
,
src
.
size
,
&
outlength
));
return
std
::
string
(
tmp
.
c_str
(),
outlength
);
}
std
::
string
CurlUnescape
(
StringView
src
)
noexcept
{
CurlEasy
easy
;
return
CurlUnescape
(
easy
.
Get
(),
src
);
}
src/lib/curl/Escape.hxx
View file @
364acc89
...
...
@@ -42,4 +42,10 @@ CurlEscapeUriPath(CURL *curl, StringView src) noexcept;
std
::
string
CurlEscapeUriPath
(
StringView
src
)
noexcept
;
std
::
string
CurlUnescape
(
CURL
*
curl
,
StringView
src
)
noexcept
;
std
::
string
CurlUnescape
(
StringView
src
)
noexcept
;
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment