dovecot-2.2: lib-http: Added http_url_escape_param()

dovecot at dovecot.org dovecot at dovecot.org
Mon Feb 4 18:17:34 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/b1a03d3c0ae7
changeset: 15722:b1a03d3c0ae7
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Feb 04 18:17:21 2013 +0200
description:
lib-http: Added http_url_escape_param()

diffstat:

 src/lib-http/http-url.c |  6 ++++--
 src/lib-http/http-url.h |  2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 50d43f04511b -r b1a03d3c0ae7 src/lib-http/http-url.c
--- a/src/lib-http/http-url.c	Sun Feb 03 21:53:24 2013 +0200
+++ b/src/lib-http/http-url.c	Mon Feb 04 18:17:21 2013 +0200
@@ -283,5 +283,7 @@
 	return str_c(urlstr);
 }
 
-
-
+void http_url_escape_param(string_t *out, const char *data)
+{
+	uri_append_query_data(out, "&;", data);
+}
diff -r 50d43f04511b -r b1a03d3c0ae7 src/lib-http/http-url.h
--- a/src/lib-http/http-url.h	Sun Feb 03 21:53:24 2013 +0200
+++ b/src/lib-http/http-url.h	Mon Feb 04 18:17:21 2013 +0200
@@ -45,4 +45,6 @@
 
 const char *http_url_create(const struct http_url *url);
 
+void http_url_escape_param(string_t *out, const char *data);
+
 #endif


More information about the dovecot-cvs mailing list