diff options
Diffstat (limited to 'src/HttpResponse.cc')
| -rw-r--r-- | src/HttpResponse.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/HttpResponse.cc b/src/HttpResponse.cc index 4037b417..db8181e5 100644 --- a/src/HttpResponse.cc +++ b/src/HttpResponse.cc @@ -101,7 +101,12 @@ std::string HttpResponse::determinFilename() const Util::getContentDispositionFilename (httpHeader->getFirst(HttpHeader::CONTENT_DISPOSITION)); if(contentDisposition.empty()) { - return Util::urldecode(httpRequest->getFile()); + std::string file = Util::urldecode(httpRequest->getFile()); + if(file.empty()) { + return "index.html"; + } else { + return file; + } } else { logger->info(MSG_CONTENT_DISPOSITION_DETECTED, cuid, contentDisposition.c_str()); |
