diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-07-18 11:36:41 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-07-18 11:36:41 +0000 |
| commit | 247b1f2a4f817e2ccb2305ea9215a1ac00f73f3e (patch) | |
| tree | 33c3ba154c621c7e405bd6cfb82c5b310414d001 /src/HttpResponseCommand.cc | |
| parent | 18480a08df4f1fbb7b713cde7a72d04451795f75 (diff) | |
2007-07-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that prevents filename in content-disposition from
being retrieved when filename is not quoted.
* src/Util.cc (getContentDispositionFilename)
Fixed the bug that causes infinate loop and memory leak when
file open
operation failed.
* src/HttpResponseCommand.cc (handleDefaultEncoding)
Diffstat (limited to 'src/HttpResponseCommand.cc')
| -rw-r--r-- | src/HttpResponseCommand.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc index 5bdf4349..821406f6 100644 --- a/src/HttpResponseCommand.cc +++ b/src/HttpResponseCommand.cc @@ -142,13 +142,18 @@ bool HttpResponseCommand::handleDefaultEncoding(const HttpResponseHandle& httpRe } DownloadCommand* command = 0; - File file(_requestGroup->getFilePath()); - if(_requestGroup->getRemainingUris().empty() && !file.exists()) { - command = createHttpDownloadCommand(httpResponse); + try { + File file(_requestGroup->getFilePath()); + if(_requestGroup->getRemainingUris().empty() && !file.exists()) { + command = createHttpDownloadCommand(httpResponse); + } + _requestGroup->loadAndOpenFile(); + _requestGroup->prepareForNextAction(cuid, req, e, command); + e->noWait = true; + } catch(Exception* e) { + delete command; + throw; } - _requestGroup->loadAndOpenFile(); - _requestGroup->prepareForNextAction(cuid, req, e, command); - e->noWait = true; return true; } |
