mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-09-12 13:48:58 +02:00
fix: omit source content length for rewritten file responses
This commit is contained in:
@@ -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