summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/HttpClient.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/HttpClient.cc b/lib/HttpClient.cc
index 8ae5248..19d30ef 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.18 2008-02-15 15:10:22 pixel Exp $ */
+/* $Id: HttpClient.cc,v 1.19 2008-07-22 14:31:32 pixel Exp $ */
#include <TaskMan.h>
#include <HttpClient.h>
@@ -28,7 +28,7 @@
t_headers no_headers;
-const timeval timeout = { 8, 0 };
+const timeval timeout = { 12000, 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;
@@ -249,10 +249,14 @@ void HttpClient::DecodeURL() throw (GeneralException) {
p = tmp.strchr('/');
if (p < 0) {
- host = tmp;
+ host = tmp.trim();
+ uri = "/";
return;
}
- host = tmp.extract(0, p - 1);
- uri = tmp.extract(p);
+ host = tmp.extract(0, p - 1).trim();
+ uri = tmp.extract(p).trim();
+ if (uri == "") {
+ uri = "/";
+ }
}