-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support socket communication option in apache::fastcgi::server #1368
Support socket communication option in apache::fastcgi::server #1368
Conversation
| @@ -10,6 +10,14 @@ | |||
|
|
|||
| Apache::Mod['fastcgi'] -> Apache::Fastcgi::Server[$title] | |||
|
|
|||
| if is_absolute_path($host) { | |||
| $is_host = false | |||
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.
Perhaps this would be more accurately $is_socket?
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.
Or even ditch the whole $is_whatever and go for:
if is_absolute_path($host) {
$socket = $host
} else {
$split = split($host, ':')
validate_ip_address($split[0])
$_host = $host
}Then
<%= if @_host then " -host" end %><%= if @socket then " -socket" end %>which leaves room for other types. Are there types other than host or socket?
|
@janschumann is there anything else we can help with ? |
|
@hunner: afaik there are only tcp and socket connection options available ... |
|
@hunner rebased and squashed |
|
@janschumann Thanks. Could you also mention the new functionality in https://github.com/puppetlabs/puppetlabs-apache#host-1 ? |
a socket path can now be passed to apache::fastcgi::server::host to support socket communication
|
@hunner docs added. I also removed the ip validation of the host parameter, as it may also be a hostname :-) |
|
Good point. |
Support socket communication option in apache::fastcgi::server
|
@hunner thanks for merging! |
For local fcgi servers it makes sense to skip the TCP stack and communicate via socket.
This is also sugested in #MODULES-1405.
Instead of introducing a new parameter socket, validate functions are used to decide if we have a host or a socket in parameter
host.It might be confusing to pass a socket path to a parameter named
host, but changing the host parameter name to something likehost_or_socketwould introduce backwards incompatibility.