mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [mesos] zorro786 commented on pull request #371: [MESOS-10199] Fix Host field in client headers
Date Fri, 04 Dec 2020 00:46:00 GMT

zorro786 commented on pull request #371:
URL: https://github.com/apache/mesos/pull/371#issuecomment-738476472


   > * Can you follow the existing logic for the http client?  See: https://github.com/apache/mesos/blob/1.11.0/3rdparty/libprocess/src/http.cpp#L1092-L1108
   
   I find the existing logic redundant in this case, as `message.to.address` is an Inet address
not a URL, which already includes an IP and port. `message.to.address` essentially includes
the following code block already:
   
   ```
    else if (request.url.ip.isSome()) {
       headers["Host"] = stringify(request.url.ip.get());
     }
   // Add port for non-standard ports.
   if (request.url.port.isSome() &&
         request.url.port != 80 &&
         request.url.port != 443) {
       headers["Host"] += ":" + stringify(request.url.port.get());
     }
   ```
   Please let me know if you meant something else.
   
   > * Can you remove the extra .gitignore file? It's not related to this change and we
like to keep our commits tidy with only a single logical change involved
   
   Done
   > * Can you add or update one of the existing tests in libprocess?
   
   Done
   
   cc: @vinodkone @asekretenko 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message