mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-11-17 17:44:09 +01:00
fix: omit source content length for rewritten file responses
This commit is contained in:
2 files changed
+44
-4
No files matched your search
@@ -477,10 +477,6 @@ export default class AnonymizedFile {
|
||||
if (!mime && data.isText) {
|
||||
res.contentType("text/plain");
|
||||
}
|
||||
if (!data.wasAnonimized && this._file?.size) {
|
||||
// the text files may be anonymized and therefore the size may be different
|
||||
res.header("Content-Length", this._file?.size.toString());
|
||||
}
|
||||
});
|
||||
const content = await this.content();
|
||||
function handleStreamError(error: Error) {
|
||||
|
||||
Reference in new issue
Block a user