-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33935/#review82844
-----------------------------------------------------------



src/master/master.cpp
<https://reviews.apache.org/r/33935/#comment133679>

    Just to be consistent, can you follow up with a patch to use lambda 
consistently here?



src/master/master.cpp
<https://reviews.apache.org/r/33935/#comment133678>

    Why do you need to capture `this`? Http::log is a static function, I don't 
think you need to capture `this`.
    
    Capture `this` is in general dangeous because you want to make sure the 
callback is invoked before this object is destructured. It's not obviously here 
that this is the case.



src/slave/http.cpp
<https://reviews.apache.org/r/33935/#comment133683>

    I think we usually put `?` and `:` in the end (similar to what we put `=` 
in the end):
    
    ```
    << (userAgent.isSome() ?
         " with User-Agent='" + userAgent.get() + "'" :
         "")
    << (...)
     
    ```
    
    (BTW, I think you don't need `string(...)` above)


- Jie Yu


On May 7, 2015, 5:47 a.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33935/
> -----------------------------------------------------------
> 
> (Updated May 7, 2015, 5:47 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Vinod Kone.
> 
> 
> Bugs: MESOS-2519
>     https://issues.apache.org/jira/browse/MESOS-2519
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This adds the client address, as well as user-agent and forwarding 
> information, if present.
> 
> 
> Diffs
> -----
> 
>   src/master/http.cpp fb448256d7ced1f47ea48ccfca2ae267bc26ef94 
>   src/master/master.hpp 49ee050ca4d2b2c5f75ce864fcf6ae703dfdeadd 
>   src/master/master.cpp bee842557c8397428ca51e46faa182a391584be3 
>   src/slave/http.cpp f678aabdccd8c16e25c18ffb5075265ed8b76a70 
>   src/slave/slave.hpp 654a8698be88e0d0f588190775dc3eee6b36f92e 
>   src/slave/slave.cpp c78ee3c9e7fc38ad364e83f4abe267e86bfbbc13 
> 
> Diff: https://reviews.apache.org/r/33935/diff/
> 
> 
> Testing
> -------
> 
> Tested manually:
> 
> I0507 05:41:37.386196 28393 http.cpp:233] HTTP GET for /master/state.json 
> from 127.0.0.1:5050 with User-Agent='curl/7.15.5 (x86_64-redhat-linux-gnu) 
> libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5'
> 
> I0507 05:42:34.905570 31000 http.cpp:237] HTTP GET for /slave(1)/state.json 
> from 127.0.0.1:5051 with User-Agent='curl/7.15.5 (x86_64-redhat-linux-gnu) 
> libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5'
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>

Reply via email to