src/Main/options.cxx:fgOptLoadTape(): enable compression when downloading recording.
This commit is contained in:
parent
d7b889a74a
commit
335ac0cb67
1 changed files with 3 additions and 0 deletions
|
@ -1675,6 +1675,8 @@ fgOptLoadTape(const char* arg)
|
||||||
http->init();
|
http->init();
|
||||||
SG_LOG(SG_GENERAL, SG_ALERT, "Replaying url " << url << " using local path: " << path);
|
SG_LOG(SG_GENERAL, SG_ALERT, "Replaying url " << url << " using local path: " << path);
|
||||||
filerequest.reset(new simgear::HTTP::FileRequest(url, path, true /*append*/));
|
filerequest.reset(new simgear::HTTP::FileRequest(url, path, true /*append*/));
|
||||||
|
filerequest->setAcceptEncoding(""); // "" means request any supported compression.
|
||||||
|
|
||||||
long max_download_speed = fgGetLong("/sim/replay/download-max-bytes-per-sec");
|
long max_download_speed = fgGetLong("/sim/replay/download-max-bytes-per-sec");
|
||||||
if (max_download_speed != 0) {
|
if (max_download_speed != 0) {
|
||||||
// Can be useful to limite download speed for testing background
|
// Can be useful to limite download speed for testing background
|
||||||
|
@ -1696,6 +1698,7 @@ fgOptLoadTape(const char* arg)
|
||||||
// timeout.
|
// timeout.
|
||||||
//
|
//
|
||||||
time_t t0 = time(NULL);
|
time_t t0 = time(NULL);
|
||||||
|
SG_LOG(SG_GENERAL, SG_ALERT, "Starting download from: " << url);
|
||||||
for(;;) {
|
for(;;) {
|
||||||
// Run http client's update() to download any pending data.
|
// Run http client's update() to download any pending data.
|
||||||
http->update(0);
|
http->update(0);
|
||||||
|
|
Loading…
Reference in a new issue