Loading lib/http.c +11 −0 Original line number Diff line number Diff line Loading @@ -1881,6 +1881,7 @@ CURLcode Curl_add_custom_headers(struct connectdata *conn, return CURLE_OK; } #ifndef CURL_DISABLE_PARSEDATE CURLcode Curl_add_timecondition(struct Curl_easy *data, Curl_send_buffer *req_buffer) { Loading Loading @@ -1939,6 +1940,16 @@ CURLcode Curl_add_timecondition(struct Curl_easy *data, return result; } #else /* disabled */ CURLcode Curl_add_timecondition(struct Curl_easy *data, Curl_send_buffer *req_buffer) { (void)data; (void)req_buffer; return CURLE_OK; } #endif /* * Curl_http() gets called from the generic multi_do() function when a HTTP Loading lib/parsedate.c +26 −15 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -82,20 +82,6 @@ #include "warnless.h" #include "parsedate.h" const char * const Curl_wkday[] = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}; static const char * const weekday[] = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }; const char * const Curl_month[]= { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; struct tzinfo { char name[5]; int offset; /* +/- in minutes */ }; /* * parsedate() * Loading @@ -114,6 +100,22 @@ static int parsedate(const char *date, time_t *output); #define PARSEDATE_LATER 1 #define PARSEDATE_SOONER 2 #ifndef CURL_DISABLE_PARSEDATE const char * const Curl_wkday[] = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}; static const char * const weekday[] = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }; const char * const Curl_month[]= { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; struct tzinfo { char name[5]; int offset; /* +/- in minutes */ }; /* Here's a bunch of frequently used time zone names. These were supported by the old getdate parser. */ #define tDAYZONE -60 /* offset for daylight savings time */ Loading Loading @@ -555,6 +557,15 @@ static int parsedate(const char *date, time_t *output) return PARSEDATE_OK; } #else /* disabled */ static int parsedate(const char *date, time_t *output) { (void)date; *output = 0; return PARSEDATE_OK; /* a lie */ } #endif time_t curl_getdate(const char *p, const time_t *now) { Loading Loading
lib/http.c +11 −0 Original line number Diff line number Diff line Loading @@ -1881,6 +1881,7 @@ CURLcode Curl_add_custom_headers(struct connectdata *conn, return CURLE_OK; } #ifndef CURL_DISABLE_PARSEDATE CURLcode Curl_add_timecondition(struct Curl_easy *data, Curl_send_buffer *req_buffer) { Loading Loading @@ -1939,6 +1940,16 @@ CURLcode Curl_add_timecondition(struct Curl_easy *data, return result; } #else /* disabled */ CURLcode Curl_add_timecondition(struct Curl_easy *data, Curl_send_buffer *req_buffer) { (void)data; (void)req_buffer; return CURLE_OK; } #endif /* * Curl_http() gets called from the generic multi_do() function when a HTTP Loading
lib/parsedate.c +26 −15 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms Loading Loading @@ -82,20 +82,6 @@ #include "warnless.h" #include "parsedate.h" const char * const Curl_wkday[] = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}; static const char * const weekday[] = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }; const char * const Curl_month[]= { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; struct tzinfo { char name[5]; int offset; /* +/- in minutes */ }; /* * parsedate() * Loading @@ -114,6 +100,22 @@ static int parsedate(const char *date, time_t *output); #define PARSEDATE_LATER 1 #define PARSEDATE_SOONER 2 #ifndef CURL_DISABLE_PARSEDATE const char * const Curl_wkday[] = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}; static const char * const weekday[] = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }; const char * const Curl_month[]= { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; struct tzinfo { char name[5]; int offset; /* +/- in minutes */ }; /* Here's a bunch of frequently used time zone names. These were supported by the old getdate parser. */ #define tDAYZONE -60 /* offset for daylight savings time */ Loading Loading @@ -555,6 +557,15 @@ static int parsedate(const char *date, time_t *output) return PARSEDATE_OK; } #else /* disabled */ static int parsedate(const char *date, time_t *output) { (void)date; *output = 0; return PARSEDATE_OK; /* a lie */ } #endif time_t curl_getdate(const char *p, const time_t *now) { Loading