drogonframework / drogonframework/drogon

Static files compressed with brotli (`br_static=true`) will fail to be sent if uncompressed file doesn't exist

Open
#1,302 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
14.3k
Forks
1.4k
Avg merge
1d 13h
Merged PRs (30d)
14

Description

The checks whether or not the `*.br` compressed files exist are done in `StaticFileRouter::sendStaticFileResponse`, however if the original uncompressed file doesn't exist in the static file location then the request would be rejected much before that inside `StaticFileRouter::route` which checks for the existence of the original uncompressed file without the `.br` extension even tho the `*.br` file exists there. Doesn't it make more sense for those checks to be added inside the `route` function as well so that compressed files can be sent by request even if the uncompressed ones don't exist?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.