diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/send_file.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/send_file.cc b/src/send_file.cc index 8611b6f..e5bf92b 100644 --- a/src/send_file.cc +++ b/src/send_file.cc @@ -29,7 +29,11 @@ public: } auto resp = transport->create_ok_data(""); - resp->add_header(header_, path_ + std::string(relative_path)); + std::string value = path_; + if (relative_path.empty() || relative_path.front() != '/') + value.push_back('/'); + value.append(relative_path); + resp->add_header(header_, std::move(value)); return resp; } |
