-
-
Notifications
You must be signed in to change notification settings - Fork 87
Option to have http.server and http.client use UNIX sockets instead of TCP #18
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
Conversation
http/client.lua
Outdated
end | ||
end | ||
local ok, err, errno = s:starttls(tls, deadline and (deadline-monotime())) | ||
local ok, err, errno = s:starttls(tls, timeout) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this line different?
spec/server_spec.lua
Outdated
-- pending. | ||
-- | ||
--]] | ||
local socket_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this block doing?
You just generate a random file name... then delete it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm double checking now but Linux systems create the return value of os.tmpname() so I need to remove that, then use the filename with .socket
. I'm checking later when I get home whether I actually use the path generated in the tests. I might have to create a wrapper function for this and then remove this block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why bother with adding .socket? just use the result of os.tmpname
.
-- pending. | ||
-- | ||
--]] | ||
local socket_path = os.tmpname() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not generate one per test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to? If you remove it in the finally() call, it should be done after the it() call, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's fine I guess.
Replication and improvement of #8.