----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30032/#review69827 -----------------------------------------------------------
3rdparty/libprocess/include/process/http.hpp <https://reviews.apache.org/r/30032/#comment126239> How about we take a Time instead of a std::string so that nobody has to format the HTTP Last-Modified date string themselves. 3rdparty/libprocess/src/process.cpp <https://reviews.apache.org/r/30032/#comment114629> Alphabetical ordering please. 3rdparty/libprocess/src/process.cpp <https://reviews.apache.org/r/30032/#comment126241> s/ &path/& path/ Please move '{' to newline. We use camelCase instead of snake_case for our function names. 3rdparty/libprocess/src/process.cpp <https://reviews.apache.org/r/30032/#comment126243> Two newlines in between functions please. 3rdparty/libprocess/src/process.cpp <https://reviews.apache.org/r/30032/#comment126245> s/static// <-- We'll replace with constexpr later, let's not allocate in static storage. 3rdparty/libprocess/src/process.cpp <https://reviews.apache.org/r/30032/#comment126246> if (strftime(...) == 0) { ... } 3rdparty/libprocess/src/process.cpp <https://reviews.apache.org/r/30032/#comment126247> In preference order: (1) return buffer; (2) return string(buffer); (3) return Result<string>(buffer); (4) return Result<string>(string(buffer)); And please add TODOs in result.hpp if (1) does not compile! 3rdparty/libprocess/src/process.cpp <https://reviews.apache.org/r/30032/#comment126244> Result<Time> time = Path(response.path).mtime(); - Benjamin Hindman On March 26, 2015, 9:53 a.m., Alexander Rojas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30032/ > ----------------------------------------------------------- > > (Updated March 26, 2015, 9:53 a.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 9cf05ac > 3rdparty/libprocess/src/process.cpp 67b6b3b > 3rdparty/libprocess/src/tests/process_tests.cpp 3bbfe0a > > Diff: https://reviews.apache.org/r/30032/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Alexander Rojas > >