You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by kxepal <gi...@git.apache.org> on 2015/08/21 10:15:24 UTC

[GitHub] couchdb-couch pull request: Bind both to IPv4 and IPv6 with specia...

GitHub user kxepal opened a pull request:

    https://github.com/apache/couchdb-couch/pull/89

    Bind both to IPv4 and IPv6 with special "any" value

    This also removes need in special wrapper to handle atom as default
    for config:get call.
    
    COUCHDB-2783

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kxepal/couchdb-couch 2783-bind-to-any-address

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-couch/pull/89.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #89
    
----
commit 819732ccb341b8d881eb461489220338a5f0caea
Author: Alexander Shorin <kx...@apache.org>
Date:   2015-08-21T08:14:28Z

    Bind both to IPv4 and IPv6 with special "any" value
    
    This also removes need in special wrapper to handle atom as default
    for config:get call.
    
    COUCHDB-2783

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Bind both to IPv4 and IPv6 with specia...

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/89#discussion_r37622623
  
    --- Diff: src/couch_httpd.erl ---
    @@ -88,7 +89,10 @@ start_link(https) ->
              {ssl_opts, SslOpts}],
         start_link(https, Options).
     start_link(Name, Options) ->
    -    BindAddress = with_default(config:get("httpd", "bind_address"), any),
    +    BindAddress = case config:get("httpd", "bind_address", "any") of
    +                      "any" -> any;
    +                      Else -> Else
    +                  end,
         validate_bind_address(BindAddress),
    --- End diff --
    
    say `ok = ` here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Bind both to IPv4 and IPv6 with specia...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/couchdb-couch/pull/89


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Bind both to IPv4 and IPv6 with specia...

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/89#discussion_r37621915
  
    --- Diff: src/couch_httpd.erl ---
    @@ -1127,11 +1127,10 @@ check_for_last(#mp{buffer=Buffer, data_fun=DataFun}=Mp) ->
                     data_fun = DataFun2})
         end.
     
    +validate_bind_address(any) -> any;
    +validate_bind_address("any") -> any;
    --- End diff --
    
    I don't think the validate_bind_address function should work this way, it should _only_ validate. It now returns 'ok' or 'any' or throws, which is quite confusing. The intention is correct though, to allow config to hold "any" and have that be the atom any. Have another go :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Bind both to IPv4 and IPv6 with specia...

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/89#discussion_r37622129
  
    --- Diff: src/couch_httpd.erl ---
    @@ -1127,11 +1127,10 @@ check_for_last(#mp{buffer=Buffer, data_fun=DataFun}=Mp) ->
                     data_fun = DataFun2})
         end.
     
    +validate_bind_address(any) -> any;
    +validate_bind_address("any") -> any;
    --- End diff --
    
    Right (: 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Bind both to IPv4 and IPv6 with specia...

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/89#issuecomment-133364699
  
    @rnewson  Fixed that problem. Please take another look.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Bind both to IPv4 and IPv6 with specia...

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/89#issuecomment-133363190
  
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Bind both to IPv4 and IPv6 with specia...

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/89#issuecomment-133373368
  
    +1, please squash before merging.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Bind both to IPv4 and IPv6 with specia...

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/89#issuecomment-133363359
  
    hrm, I retract the +1, sorry.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Bind both to IPv4 and IPv6 with specia...

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/89#issuecomment-133347131
  
    This only helps for the private 5986 port for 2.0 which should really only bind to localhost. Look at https://github.com/apache/couchdb-chttpd/blob/master/src/chttpd.erl#L112.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Bind both to IPv4 and IPv6 with specia...

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/89#discussion_r37622792
  
    --- Diff: src/couch_httpd.erl ---
    @@ -1127,11 +1131,9 @@ check_for_last(#mp{buffer=Buffer, data_fun=DataFun}=Mp) ->
                     data_fun = DataFun2})
         end.
     
    +validate_bind_address(any) -> ok;
     validate_bind_address(Address) ->
         case inet_parse:address(Address) of
    -        {ok, _} -> ok;
    --- End diff --
    
    Accidental change. Thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Bind both to IPv4 and IPv6 with specia...

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/89#discussion_r37622610
  
    --- Diff: src/couch_httpd.erl ---
    @@ -1127,11 +1131,9 @@ check_for_last(#mp{buffer=Buffer, data_fun=DataFun}=Mp) ->
                     data_fun = DataFun2})
         end.
     
    +validate_bind_address(any) -> ok;
     validate_bind_address(Address) ->
         case inet_parse:address(Address) of
    -        {ok, _} -> ok;
    --- End diff --
    
    change this back to `ok`, you never use the return value anyway.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request: Bind both to IPv4 and IPv6 with specia...

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/89#issuecomment-133347855
  
    @rnewson I know. See also https://github.com/apache/couchdb-chttpd/pull/60


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---