diff options
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/http/libkvihttp.cpp | 14 |
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. |
