]> sjero.net Git - wget/commitdiff
[svn] Fix support for rfc850 time recognition on systems where strptime
authorhniksic <devnull@localhost>
Tue, 3 Apr 2001 18:54:32 +0000 (11:54 -0700)
committerhniksic <devnull@localhost>
Tue, 3 Apr 2001 18:54:32 +0000 (11:54 -0700)
format specs %a and %A are not the same.
Published in <49022.983849922@ideon.st.ryukoku.ac.jp>.

src/ChangeLog
src/http.c

index 83a5838037308cb49fcb32045735f0ab26d941d4..6fcd4f97edbae164e180a9b59ade3e2e07958e2e 100644 (file)
@@ -1,3 +1,8 @@
+2001-04-03  KOJIMA Hajime  <kjm@rins.ryukoku.ac.jp>
+
+       * http.c (http_atotm): Use %A instead of %a to match full
+       weekday.  (On most systems there is no difference.)
+
 2001-04-03  Paul Bludov  <paul@ozero.net>
 
        * mswindows.c (sleep): Use SleepEx() instead of Sleep().
index 7c40d060092a42a150334716c4341d49fceb28ad..ec593be26894c21a574fbe9085bebcbaa33d4afe 100644 (file)
@@ -1898,8 +1898,8 @@ http_atotm (char *time_string)
   /* RFC1123: Thu, 29 Jan 1998 22:12:57 */
   if (check_end (strptime (time_string, "%a, %d %b %Y %T", &t)))
     return mktime_from_utc (&t);
-  /* RFC850:  Thu, 29-Jan-98 22:12:57 */
-  if (check_end (strptime (time_string, "%a, %d-%b-%y %T", &t)))
+  /* RFC850:  Thursday, 29-Jan-98 22:12:57 */
+  if (check_end (strptime (time_string, "%A, %d-%b-%y %T", &t)))
     return mktime_from_utc (&t);
   /* asctime: Thu Jan 29 22:12:57 1998 */
   if (check_end (strptime (time_string, "%a %b %d %T %Y", &t)))