diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-05-08 21:41:32 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-05-08 21:49:04 +0900 |
| commit | f60e55cece6eeee5357b68557ba8ddd4f8051b74 (patch) | |
| tree | a09099c3e33217804897afba12a09834ebe4bb2b /src/HttpResponse.cc | |
| parent | 84f1a15e10e7d6a916cc872cb84d0a4384d61c47 (diff) | |
Use index.html as filename for conditional-get when file is missing in URI
Previously we disabled conditional-get if file part is missing in URI.
But we use constant string "index.html" in this case, so we can do the
same to determine the modification time. In this patch, if we have
file part in URI, we are not going to set absolute file path in
FileEntry, since it prevents content-disposition from working.
Diffstat (limited to 'src/HttpResponse.cc')
| -rw-r--r-- | src/HttpResponse.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/HttpResponse.cc b/src/HttpResponse.cc index c4168b3e..80c1cfd6 100644 --- a/src/HttpResponse.cc +++ b/src/HttpResponse.cc @@ -124,7 +124,7 @@ std::string HttpResponse::determineFilename() const auto file = httpRequest_->getFile(); file = util::percentDecode(file.begin(), file.end()); if (file.empty()) { - return "index.html"; + return Request::DEFAULT_FILE; } return file; } |
