Skip to content

Add HTTP::Server#bind_unix#5959

Merged
RX14 merged 2 commits intocrystal-lang:masterfrom
straight-shoota:jm/feature/http-server-unix
Apr 18, 2018
Merged

Add HTTP::Server#bind_unix#5959
RX14 merged 2 commits intocrystal-lang:masterfrom
straight-shoota:jm/feature/http-server-unix

Conversation

@straight-shoota
Copy link
Copy Markdown
Member

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

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

end

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

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
Copy Markdown
Member

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.

4 participants