From dc11516b21fedba11aebb5211fc53ad6ce783aaa Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 7 Jan 2008 23:38:14 +0000 Subject: Adding basic space escaping. --- lib/HttpClient.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/HttpClient.cc b/lib/HttpClient.cc index 87d1117..76bbdf6 100644 --- a/lib/HttpClient.cc +++ b/lib/HttpClient.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: HttpClient.cc,v 1.14 2007-09-28 09:05:55 pixel Exp $ */ +/* $Id: HttpClient.cc,v 1.15 2008-01-07 23:38:14 pixel Exp $ */ #include #include @@ -31,6 +31,12 @@ t_headers no_headers; const timeval timeout = { 8, 0 }; HttpClient::HttpClient(const String & _url, Handle * _out, const String & _fake_host, t_headers _headers, const Variables & _vars) : url(_url), out(_out), fake_host(_fake_host), headers(_headers), vars(_vars), host(""), uri("") { + int p; + for (p = 0; p < url.strlen(); p++) { + if (url[p] == ' ') { + url[p] = '+'; + } + } DecodeURL(); Client.SetNonBlock(); -- cgit v1.2.3