aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/http
diff options
context:
space:
mode:
authorGravatar Szymon Tomasz Stefanek2010-06-21 21:30:17 +0000
committerGravatar Szymon Tomasz Stefanek2010-06-21 21:30:17 +0000
commitbfcc3e74db7fe5a3c3f02ac91f862c194e4668f0 (patch)
tree5f234546a48bbdb881268c16bc606fd3e6445ef6 /src/modules/http
parenttweaked makedist.sh a bit: We can use svn export and don't need to deal with (diff)
downloadKVIrc-bfcc3e74db7fe5a3c3f02ac91f862c194e4668f0.tar.gz
KVIrc-bfcc3e74db7fe5a3c3f02ac91f862c194e4668f0.tar.bz2
KVIrc-bfcc3e74db7fe5a3c3f02ac91f862c194e4668f0.zip
Some details in the http transfer module.
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@4500 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/http')
-rw-r--r--src/modules/http/libkvihttp.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/http/libkvihttp.cpp b/src/modules/http/libkvihttp.cpp
index c69267ba9..b29423271 100644
--- a/src/modules/http/libkvihttp.cpp
+++ b/src/modules/http/libkvihttp.cpp
@@ -109,6 +109,15 @@ static bool http_kvs_complete_get(KviKvsModuleCommandCall * c,QString &szUrl,QSt
if(bOk)hft->request()->setContentOffset(uContentOffset);
}
+ // FIXME: this should be numeric
+ if(c->switches()->getAsStringIfExisting('t',"timeout",tmp))
+ {
+ bool bOk;
+ unsigned int uConnectionTimeout = tmp.toUInt(&bOk);
+ if(bOk)
+ hft->request()->setConnectionTimeout(uConnectionTimeout);
+ }
+
if(c->switches()->getAsStringIfExisting('w',"winctrl",tmp))
{
if(!tmp.contains('h'))hft->invokeTransferWindow(c->window(),tmp.contains('m'),tmp.contains('n'));
@@ -199,6 +208,11 @@ static bool http_kvs_complete_get(KviKvsModuleCommandCall * c,QString &szUrl,QSt
and the received stream will be appended to the existing file.(avoid it unless you know what you're doing:
it's easy to download broken files).[br]
+ !sw: -t=<timeout_in_seconds> | --timeout=<timeout_in_seconds>
+ Changes the default connection timeout to the <timeout_in_seconds>.
+ A connection stuck for more than <timeout_in_seconds> seconds will be simply aborted.
+ The default timeout is 60 seconds and is appropriate for most operations. Use with care.[br]
+
!sw: -h | --head
Causes the connection to use the HTTP HEAD method that effectively
does not transfer real data. The server sends only the response headers.