You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by kevdoran <gi...@git.apache.org> on 2017/07/07 15:55:33 UTC

[GitHub] nifi-minifi-cpp pull request #114: site2site port negotiation

Github user kevdoran commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/114#discussion_r126168614
  
    --- Diff: libminifi/include/utils/HTTPUtils.h ---
    @@ -88,6 +90,40 @@ struct HTTPRequestResponse {
     
     };
     
    +static void parse_url(std::string &url, std::string &host, int &port, std::string &protocol) {
    --- End diff --
    
    This URL parsing method is a subset of valid URLs. Are we ok with that? For example, it will fail if passed a Literal IPv6 URL as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986) or [RFC 2732](https://tools.ietf.org/html/rfc2732), e.g.:
    
     `http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/nifi`
    
    If we are ok with this parser being designed to work with URLs of a certain format, we should document those assumptions of inputs.
    
    If we would like this part of the code to be a bit more robust for cases we haven't thought of (both present and future), we could consider adding a dependency to a RFC-compliant URI parser, or, if we want to avoid adding a dependency, just expanding the logic to cover more valid URLs.
    
    Lastly, should the url input arg be const and checked for null?


---
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.
---