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

Add HTTP::Server#bind_unix #5959

Merged
merged 2 commits into from Apr 18, 2018

Conversation

straight-shoota
Copy link
Member

@straight-shoota straight-shoota commented Apr 17, 2018

Fixes one half of #2735 and follows up on #5776

@@ -310,6 +329,42 @@ module HTTP
end
end
end

{% if flag?(:unix) %}
describe "#bind_unix" do
Copy link
Contributor

Choose a reason for hiding this comment

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

indent

# TODO: replace with `HTTP::Client` once it supports connecting to Unix socket.
private def unix_request(path)
UNIXSocket.open(path) do |io|
io << "GET / HTTP/1.1\r\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it shorter to use HTTP::Request directly here?

@RX14 RX14 added this to the Next milestone Apr 18, 2018
@RX14 RX14 merged commit aa596d3 into crystal-lang:master Apr 18, 2018
@straight-shoota straight-shoota deleted the jm/feature/http-server-unix branch April 18, 2018 14:58
chris-huxtable pushed a commit to chris-huxtable/crystal that referenced this pull request Jun 6, 2018
* Add HTTP::Server#bind_unix

* fixup! Add HTTP::Server#bind_unix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants