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

Qualifier values do not have first character converted to lowercase #64

Closed
wants to merge 2 commits into from

Conversation

wetterjames4
Copy link
Contributor

FromString panics for some inputs. This change fixes the issue and adds a test to ensure it works.

FromString panics for some inputs. This change fixes the issue and
adds a test to ensure it works.
// only the first character needs to be lowercase. Note that pURL is always UTF8, so we
// don't need to care about unicode here.
Value: strings.ToLower(value[:1]) + value[1:],
value = strings.ToLower(value[:1]) + value[1:]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not even sure the lowercase first character is needed. I can't see it specified in the spec.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@tommyknows Hey Ramon, do you know if we really need lowercase characters here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Mh, I thought this was just the behaviour I ported from before the refactor, but I actually can't seem to find that 👀

i wonder why I've added it in that case...

Also, it's not in the spec and I can't see any test cases requiring this. I'd say remove it then...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am in favour of removing the lowercase conversion. I updated the title of the pull request and added another commit to just remove the case conversion.

@wetterjames4 wetterjames4 changed the title Fix panic in parseQualifiers Qualifier values do not have first character converted to lowercase Sep 28, 2023
This is not required by the spec or any test cases.
@shibumi
Copy link
Collaborator

shibumi commented Sep 29, 2023

I think we can close this PR here, because the commits are already in: #65

@shibumi shibumi closed this Sep 29, 2023
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.

3 participants