From bd2cb404244dab113632b0ba543b7511d372045a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 11 Jan 2018 17:26:41 +0100 Subject: [PATCH] lib/curl/Easy: add curl_easy_escape() wrapper --- src/lib/curl/Easy.hxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/curl/Easy.hxx b/src/lib/curl/Easy.hxx index 4867ac0ba..a2f134a77 100644 --- a/src/lib/curl/Easy.hxx +++ b/src/lib/curl/Easy.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 Max Kellermann + * Copyright (C) 2016-2018 Max Kellermann * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -87,6 +87,10 @@ public: if (code != CURLE_OK) throw std::runtime_error(curl_easy_strerror(code)); } + + char *Escape(const char *string, int length=0) const noexcept { + return curl_easy_escape(handle, string, length); + } }; #endif