Skip to content

Do not send empty If-None-Match in tarball request - #2738

Merged
ferd merged 1 commit into
erlang:mainfrom
dmitrivereshchagin:empty-if-none-match
Aug 22, 2022
Merged

Do not send empty If-None-Match in tarball request#2738
ferd merged 1 commit into
erlang:mainfrom
dmitrivereshchagin:empty-if-none-match

Conversation

@dmitrivereshchagin

Copy link
Copy Markdown
Contributor

Absent entity tag list was not allowed before RFC 9110 published this June. However, it would be better not to send it. Cowlib, for example, treats it invalid, and Cowboy rejects such a request :)

I'm also not really sure if it's needed to conditionally request tarballs (GET /tarballs/PACKAGE-VERSION.tar). Seems like locally cached tarball can be used as long as its checksum is considered valid. Mix/Hex, for example, uses conditional requests only to fetch new package registry (GET /packages/PACKAGE).

Absent entity tag list was not allowed before RFC 9110 published this
June.  However, it would be better not to send it.  Cowlib, for example,
treats it invalid, and Cowboy rejects such a request :)

@ferd ferd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good. I've forgotten a lot about how that code works, but the clearer handling around empty binaries can't hurt much and Dialyzer agrees.

@ferd
ferd merged commit c0c5a0e into erlang:main Aug 22, 2022
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