Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow an empty language section in extended header encoding. #27

Merged
merged 1 commit into from
Jul 2, 2022
Merged

Allow an empty language section in extended header encoding. #27

merged 1 commit into from
Jul 2, 2022

Conversation

qubyte
Copy link
Contributor

@qubyte qubyte commented Jul 2, 2022

Section 3.2.1 of RFC 8187 specifies that the language is optional in headers using extended encoding. One example given in section 3.2.3 looks like:

foo: bar; title*=UTF-8''%c2%a3%20and%20%e2%82%ac%20rates

(the quotes are necessary delimiters, but the language is optional and in this case missing).

This PR adjusts the relevant regular expression to allow an empty string in this segment and adds a companion test.

Section 3.2.1 of RFC 8187 specifies that the language is optional
in headers using extended encoding. One example given in 3.2.3
looks like:

foo: bar; title*=UTF-8''%c2%a3%20and%20%e2%82%ac%20rates

(the quotes are necessary delimiters, but the language is optional
and in this case missing).

This commit adjusts the relevant regular expression to allow an
empty string in this segment.

https://datatracker.ietf.org/doc/html/rfc8187#section-3.2.1
@jhermsmeier jhermsmeier merged commit 82d0580 into jhermsmeier:master Jul 2, 2022
@qubyte qubyte deleted the allow-empty-language-in-extended-encoding branch July 2, 2022 14:45
@qubyte
Copy link
Contributor Author

qubyte commented Jul 2, 2022

Wow, quick merge! Thanks :)

@jhermsmeier
Copy link
Owner

Thank you! Published in http-link-header@1.0.5 :)

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.

None yet

2 participants