Skip to content

Send valid entity tags#1919

Merged
ggrossetie merged 1 commit intoyuzutech:mainfrom
nuntius35:fix-etag
Jun 7, 2025
Merged

Send valid entity tags#1919
ggrossetie merged 1 commit intoyuzutech:mainfrom
nuntius35:fix-etag

Conversation

@nuntius35
Copy link
Contributor

The proposed change will send "9.0.0CWmd-w-jCO5CZ4napfGmUm00" instead of 9.0.0CWmd-w-jCO5CZ4napfGmUm00 in the ETAG header. If there is a failure to generate an ETAG, the header is not send.

The specification for the ETAG field is in https://datatracker.ietf.org/doc/html/rfc9110#name-etag. A valid entity tag must be surrounded by quotation marks. Furthermore, it doesn't make sense to send an entity tag that does not identify the ressource.

I have noticed the problem with the current entity tags generated by Kroki when I tried to set up caching and compression with HAProxy. HAProxy does not work as intended when the backend server sends invalid ETAG fields.

The specification for the ETAG field is in
https://datatracker.ietf.org/doc/html/rfc9110#name-etag.
A valid entity tag must be surrounded by quotation marks.
Furthermore, it doesn't make sense to send an entity tag that does not
identify the ressource.
@ggrossetie
Copy link
Member

Thanks!
I didn't know that entity tag must be surrounded by quotation mark. Nice catch 👍🏻

@ggrossetie ggrossetie merged commit baefb44 into yuzutech:main Jun 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants