> On Feb. 23, 2015, 3:52 p.m., Timothy Chen wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/net.hpp, line 93 > > <https://reviews.apache.org/r/30606/diff/3/?file=869525#file869525line93> > > > > Should we move this to a static initializtion that just gets called > > once? According to the docs, it states that the global_init is not thread > > safe either. > > Bernd Mathiske wrote: > "man curl_global_init" says: > > This function must be called at least once within a program (...) > before the program calls any other function in libcurl. ..., > so multiple calls have the same effect as one call. > > Timothy Chen wrote: > My point is that it's not thread safe, and this method is exposed as > helper function that can be called anywhere.
A few lines further down is "download", which I copied my code from. How did this ever work correctly? - Bernd ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30606/#review73709 ----------------------------------------------------------- On Feb. 19, 2015, 7:51 a.m., Bernd Mathiske wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30606/ > ----------------------------------------------------------- > > (Updated Feb. 19, 2015, 7:51 a.m.) > > > Review request for mesos, Adam B, Benjamin Hindman, Till Toenshoff, and > Timothy Chen. > > > Bugs: MESOS-2072 > https://issues.apache.org/jira/browse/MESOS-2072 > > > Repository: mesos > > > Description > ------- > > Adds net::contentLength(). This makes a short HTTP request to read the > "content-length" field from the HTTP header. > > This will be used to determine the size of a file before downloading it to > the fetcher cache, in order to ensure there is enough space ahead of time. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/net.hpp > b464e517bb1e7b6b381c6cd6c0466ed788a82615 > > Diff: https://reviews.apache.org/r/30606/diff/ > > > Testing > ------- > > Used this function in the context of my implementation of MESOS-2072 and > MESOS-2074. It correctly reported the content length from an HTTP server > constructed from libprocess primitives. > > > Thanks, > > Bernd Mathiske > >
