mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Rojas" <alexan...@mesosphere.io>
Subject Re: Review Request 30032: Added support for cache control in libprocess when dealing with static files.
Date Wed, 27 May 2015 14:50:13 GMT


> On May 26, 2015, 6:15 p.m., Bernd Mathiske wrote:
> > 3rdparty/libprocess/include/process/http.hpp, line 334
> > <https://reviews.apache.org/r/30032/diff/8/?file=971658#file971658line334>
> >
> >     s/class/value
> >     ?

Removed format from here.


> On May 26, 2015, 6:15 p.m., Bernd Mathiske wrote:
> > 3rdparty/libprocess/include/process/http.hpp, line 335
> > <https://reviews.apache.org/r/30032/diff/8/?file=971658#file971658line335>
> >
> >     If it is expected that time values can either be converted or not and it is
normal if they cannot, then Option is fine. It seems to me that it should be abnormal if a
time value cannot be formatted, right? So I would suggest to use Try instead of Option.
> >     
> >     Can we maybe use this function in time.hpp?
> >     
> >         // Outputs the time in RFC 3339 Format.
> >         inline std::ostream& operator << (std::ostream& stream, const
Time& time)
> >     
> >     Ideally yes. If not, your function should be added to time.hpp.

Check review [34703](https://reviews.apache.org/r/34703/) which introduces exactly that.


> On May 26, 2015, 6:15 p.m., Bernd Mathiske wrote:
> > 3rdparty/libprocess/include/process/http.hpp, line 337
> > <https://reviews.apache.org/r/30032/diff/8/?file=971658#file971658line337>
> >
> >     Shouldn't we cast to the exact type gmtime_r expects to avoid a potential warning?
Yes, time_t may be declared by typedef to be a long in the end, but we should not rely on
that.
> >     
> >     const time_t secs = ...

Check review [34703](https://reviews.apache.org/r/34703/) which addresses this issue.


- Alexander


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


On May 27, 2015, 4:50 p.m., Alexander Rojas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30032/
> -----------------------------------------------------------
> 
> (Updated May 27, 2015, 4:50 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Bernd Mathiske, Joerg Schad, Michael Park,
and Till Toenshoff.
> 
> 
> Bugs: mesos-708
>     https://issues.apache.org/jira/browse/mesos-708
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When serving a static file, libprocess returns the header `Last-Modified` which is used
by browsers to control Cache.
> When a http request arrives containing the header `If-Modified-Since`, a response `304
Not Modified` is returned if the date in the request and the modification time (as returned
by doing `stat` in the file) coincide.
> Unit tests added.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/http.hpp bba62b393dc863e724cb602b1504eb6517ae9730

>   3rdparty/libprocess/src/process.cpp e3de3cd6b536aaaf59784360aed546512dd04dc9 
>   3rdparty/libprocess/src/tests/process_tests.cpp 67e582cc250a9767a389e2bd0cc68985477f3ffb

> 
> Diff: https://reviews.apache.org/r/30032/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Alexander Rojas
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message