Skip to content

[WIP] Make Authorization header prefix check case insensitive - #257

Merged
sdelamo merged 5 commits into
micronaut-projects:masterfrom
jcassee:auth-prefix-insensitive
May 30, 2020
Merged

sdelamo merged 5 commits into
micronaut-projects:masterfrom
jcassee:auth-prefix-insensitive

Conversation

@jcassee

@jcassee jcassee commented May 26, 2020

Copy link
Copy Markdown
Contributor

See #252

According to RFC 7235 section 2.1, the Authorization header value prefix
is a case-insensitive token.
@CLAassistant

CLAassistant commented May 26, 2020

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@graemerocher

Copy link
Copy Markdown
Contributor

Maybe the change should include toLowerCase(Locale.ENGLISH) as it could break depending on the system locale?

@jcassee

jcassee commented May 26, 2020

Copy link
Copy Markdown
Contributor Author

Maybe the change should include toLowerCase(Locale.ENGLISH) as it could break depending on the system locale?

Or Locale.ROOT? A quick "find usages" in my IDE finds many similar case-insensitive checks around HTTP are using it.

@jcassee

jcassee commented May 26, 2020

Copy link
Copy Markdown
Contributor Author

Question: is using a stub the preferred way of testing an abstract class? The Spock docs mention using a partial mock using Spy, but from a quick search through the project code, I don't see Spy used anywhere.

@sdelamo
sdelamo merged commit 4e46516 into micronaut-projects:master May 30, 2020
@sdelamo

sdelamo commented May 30, 2020

Copy link
Copy Markdown
Member

Thanks for the PR @jcassee

Question: is using a stub the preferred way of testing an abstract class? The Spock docs mention using a partial mock using Spy, but from a quick search through the project code, I don't see Spy used anywhere.

Yes, in general we don't use Spy.

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.

4 participants