> On May 22, 2015, 5:03 p.m., Bernd Mathiske wrote: > > 3rdparty/libprocess/src/process.cpp, line 2708 > > <https://reviews.apache.org/r/30032/diff/7/?file=963339#file963339line2708> > > > > Why Result and not Try? Why not propagate the error from mtime? > > > > Why snake_case and not camelCase?
1. The functions used within `time_utc` don't set errno nor set an error string. `None` is enough to continue. 1. The snake_case is used because it is consistent with all the functions in the `internal` namespace within this file. > On May 22, 2015, 5:03 p.m., Bernd Mathiske wrote: > > 3rdparty/libprocess/src/process.cpp, line 2716 > > <https://reviews.apache.org/r/30032/diff/7/?file=963339#file963339line2716> > > > > Why not report the error here? See above. > On May 22, 2015, 5:03 p.m., Bernd Mathiske wrote: > > 3rdparty/libprocess/src/process.cpp, line 2724 > > <https://reviews.apache.org/r/30032/diff/7/?file=963339#file963339line2724> > > > > Can we call this in NotModified above? See also the comments there, > > which also apply here, since this seems to be the same code. Moved the function to a static method within `NotModified`. - Alexander ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30032/#review84908 ----------------------------------------------------------- On May 26, 2015, 4:41 p.m., Alexander Rojas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30032/ > ----------------------------------------------------------- > > (Updated May 26, 2015, 4:41 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 > >
