Codeberg/pages-server
25
365
Fork
You've already forked pages-server
52

WIP: Add gzip compression #302

Draft
video-prize-ranch wants to merge 2 commits from video-prize-ranch/pages-server:main into main
pull from: video-prize-ranch/pages-server:main
merge into: Codeberg:main
Codeberg:main
Codeberg:renovate/mstruebing-editorconfig-checker-3.x
Codeberg:renovate/woodpeckerci-plugin-docker-buildx-6.x
Codeberg:renovate/golang-deps-non-major
Codeberg:git-pages-server-doc
Codeberg:pages
Codeberg:ci_user-local-acme-service
Codeberg:feat/redis-caching
Codeberg:fix/memory-problem

Fixes #223

Responses are compressed with gzip and cached.

Fixes #223 Responses are compressed with gzip and cached.
code review fixes woohoo
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
924ad83ac6
Owner
Copy link

Thank you for the contribution, I've marked it as "WIP" due to #301 breaking most of the changes, and also because I think that this will still need some discussion specifically on caching of compressed contents.

This is as of now uncovers an existing bug that's unfortunately a DoS vector, as the whole file is loaded at once into memory without a size limit, instead of streaming its contents. #301 will change quite some things that are touched in this PR, including that DoS issue, and then streamed Gzip and caching Gzip-compressed responses and thus saving CPU for often accessed resources should become a lot easier to implement.

Thank you for the contribution, I've marked it as "WIP" due to #301 breaking most of the changes, and also because I think that this will still need some discussion specifically on caching of compressed contents. This is as of now uncovers an existing bug that's unfortunately a DoS vector, as the whole file is loaded at once into memory without a size limit, instead of streaming its contents. #301 will change quite some things that are touched in this PR, including that DoS issue, and then streamed Gzip and caching Gzip-compressed responses and thus saving CPU for often accessed resources should become a lot easier to implement.
momar changed title from (削除) Add gzip compression (削除ここまで) to WIP: Add gzip compression 2024年04月02日 00:27:07 +02:00
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/pr/lint
Required
ci/woodpecker/pr/build
Required
This pull request has changes conflicting with the target branch.
  • server/gitea/client.go
  • server/upstream/upstream.go
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u main:video-prize-ranch-main
git switch video-prize-ranch-main
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/pages-server!302
Reference in a new issue
Codeberg/pages-server
No description provided.
Delete branch "video-prize-ranch/pages-server:main"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?