Fix #286 - http response headers overwritten with request headers (#483)

This commit is contained in:
Glenn Engel
2023-09-01 08:11:07 -07:00
committed by GitHub
parent 0dd284267a
commit 28832f8732
2 changed files with 2 additions and 5 deletions

View File

@ -148,6 +148,7 @@ namespace ix
content = gzipCompress(content);
headers["Content-Encoding"] = "gzip";
}
headers["Accept-Encoding"] = "gzip";
#endif
// Log request
@ -161,11 +162,6 @@ namespace ix
// headers["Content-Type"] = "application/octet-stream";
headers["Accept-Ranges"] = "none";
for (auto&& it : request->headers)
{
headers[it.first] = it.second;
}
return std::make_shared<HttpResponse>(
200, "OK", HttpErrorCode::Ok, headers, content);
});