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

URI#HTTP#origin and URI#HTTP#authority #30

Merged
merged 3 commits into from
Sep 20, 2021

Conversation

HoneyryderChuck
Copy link
Contributor

Attempt at porting to mainline an abstraction that I've been using successfuly (as a refinement) over +3y. (ref: https://gitlab.com/honeyryderchuck/httpx/-/blob/master/lib/httpx/extensions.rb#L124-131).

authority and origin are concepts which I see reinvented (and reimplemented) in a lot of ruby HTTP infrastructure (rack, app servers like puma, net-http itself). It's usefulness is so fundamental on so many levels (connection pools by origin, check by Host header, some rack spec fields) that uri could abstract it away.

test/uri/test_http.rb Outdated Show resolved Hide resolved
Copy link
Member

@ioquatix ioquatix left a comment

Choose a reason for hiding this comment

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

LGTM!

lib/uri/http.rb Outdated Show resolved Hide resolved
@ioquatix
Copy link
Member

@HoneyryderChuck I made some cosmetic changes. Hope that's okay with you, and I'm going to merge it.

@ioquatix ioquatix merged commit bf13946 into ruby:master Sep 20, 2021
@ioquatix ioquatix self-assigned this Sep 20, 2021
@HoneyryderChuck HoneyryderChuck deleted the origin-http branch September 21, 2021 11:22
@HoneyryderChuck
Copy link
Contributor Author

@ioquatix that's fine, only got time for this now, thx for jumping in :)

@HoneyryderChuck
Copy link
Contributor Author

Also, just to be clear: what's the release policy for this change? Will this be synched to be released only with ruby 3.1? How will that affect the RBS signatures for the uri lib?

matzbot pushed a commit to ruby/ruby that referenced this pull request Oct 22, 2021
ruby/uri@bf13946c32

Co-authored-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants