Commit e7cefd68 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Removed all uses of strftime() since it uses the localised version of the

week day names and month names and servers don't like that.
parent d2485e4f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@

                                  Changelog

Daniel (11 February 2005)
- Removed all uses of strftime() since it uses the localised version of the
  week day names and month names and servers don't like that.

Daniel (10 February 2005)
- Now the test script disables valgrind-testing when the test suite runs if
  libcurl is built shared. Otherwise valgrind only tests the shell that runs
+2 −1
Original line number Diff line number Diff line
@@ -22,10 +22,11 @@ This release includes the following bugfixes:
 o inflate buffer usage bugfix
 o better DICT protocol adherence
 o disable valgrind-checking while testing if libcurl is built shared
 o locale names in some date strings

Other curl-related news since the previous public release:

 o 
 o pycurl 7.13.0: http://pycurl.sf.net/

This release would not have looked like this without help, code, reports and
advice from friends like these:
+1 −1
Original line number Diff line number Diff line
@@ -17,4 +17,4 @@ HHEADERS = arpa_telnet.h netrc.h file.h timeval.h base64.h hostip.h \
  http_chunks.h strtok.h connect.h llist.h hash.h content_encoding.h	\
  share.h md5.h http_digest.h http_negotiate.h http_ntlm.h ca-bundle.h	\
  inet_pton.h strtoofft.h strerror.h inet_ntop.h curlx.h memory.h	\
  setup.h transfer.h select.h easyif.h multiif.h
  setup.h transfer.h select.h easyif.h multiif.h parsedate.h
+10 −4
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@
#include "transfer.h"
#include "url.h"
#include "memory.h"
#include "parsedate.h" /* for the week day and month names */

#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
@@ -321,7 +322,6 @@ CURLcode Curl_file(struct connectdata *conn, bool *done)
    if(result)
      return result;

#ifdef HAVE_STRFTIME
    if(fstated) {
      struct tm *tm;
      time_t clock = (time_t)statbuf.st_mtime;
@@ -332,11 +332,17 @@ CURLcode Curl_file(struct connectdata *conn, bool *done)
      tm = gmtime(&clock);
#endif
      /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
      strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S GMT\r\n",
               tm);
      snprintf(buf, BUFSIZE-1,
               "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n",
               Curl_wkday[tm->tm_wday?tm->tm_wday-1:6],
               tm->tm_mday,
               Curl_month[tm->tm_mon],
               tm->tm_year + 1900,
               tm->tm_hour,
               tm->tm_min,
               tm->tm_sec);
      result = Curl_client_write(data, CLIENTWRITE_BOTH, buf, 0);
    }
#endif
    return result;
  }

+10 −4
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@
#include "memory.h"
#include "inet_ntop.h"
#include "select.h"
#include "parsedate.h" /* for the week day and month names */

#if defined(HAVE_INET_NTOA_R) && !defined(HAVE_INET_NTOA_R_DECL)
#include "inet_ntoa_r.h"
@@ -1738,7 +1739,6 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn,
      /* If we asked for a time of the file and we actually got one as well,
         we "emulate" a HTTP-style header in our output. */

#ifdef HAVE_STRFTIME
      if(data->set.get_filetime && (data->info.filetime>=0) ) {
        struct tm *tm;
        time_t clock = (time_t)data->info.filetime;
@@ -1749,13 +1749,19 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn,
        tm = gmtime(&clock);
#endif
        /* format: "Tue, 15 Nov 1994 12:45:26" */
        strftime(buf, BUFSIZE-1,
                 "Last-Modified: %a, %d %b %Y %H:%M:%S GMT\r\n", tm);
        snprintf(buf, BUFSIZE-1,
                 "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n",
                 Curl_wkday[tm->tm_wday?tm->tm_wday-1:6],
                 tm->tm_mday,
                 Curl_month[tm->tm_mon],
                 tm->tm_year + 1900,
                 tm->tm_hour,
                 tm->tm_min,
                 tm->tm_sec);
        result = Curl_client_write(data, CLIENTWRITE_BOTH, buf, 0);
        if(result)
          return result;
      }
#endif
    }
    break;
  default:
Loading