ETag support with pre-gzipped content stored in static variables #220
JosePineiro
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
willmmiles commented about ETag support form FS files:
I assume the function you're using is beginResponse(int code, const char *contentType, const uint8_t *content, size_t len, AwsTemplateProcessor callback).
The simplest option would be to use the void send(int code, const char *contentType, const uint8_t *content, size_t len, AwsTemplateProcessor callback = nullptr) function.
The strategy might be to check if the content has the GZIP Magic number (to make sure it is a gz content). If so, use eTag and disable AwsTemplateProcessor callback.
This way, it wouldn't be necessary to create new functions, and the improvement would work in the existing code.
Beta Was this translation helpful? Give feedback.
All reactions