mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Gisle Vanem came up with a nice little work-around for bug #1230118. It
seems the Windows (MSVC) libc time functions may return data one hour off if TZ is not set and automatic DST adjustment is enabled. This made curl_getdate() return wrong value, and it also concerned internal cookie expirations etc.
This commit is contained in:
parent
e7de7d5eb3
commit
d49c144297
7
CHANGES
7
CHANGES
@ -7,6 +7,13 @@
|
|||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
|
||||||
|
Daniel (5 July 2005)
|
||||||
|
- Gisle Vanem came up with a nice little work-around for bug #1230118. It
|
||||||
|
seems the Windows (MSVC) libc time functions may return data one hour off if
|
||||||
|
TZ is not set and automatic DST adjustment is enabled. This made
|
||||||
|
curl_getdate() return wrong value, and it also concerned internal cookie
|
||||||
|
expirations etc.
|
||||||
|
|
||||||
Daniel (4 July 2005)
|
Daniel (4 July 2005)
|
||||||
- Andrew Bushnell provided enough info for me to tell that we badly needed to
|
- Andrew Bushnell provided enough info for me to tell that we badly needed to
|
||||||
fix the CONNECT authentication code with multi-pass auth methods (such as
|
fix the CONNECT authentication code with multi-pass auth methods (such as
|
||||||
|
@ -16,6 +16,7 @@ This release includes the following changes:
|
|||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
|
o corrected date parsing on Windows with auto-DST-adjust enabled
|
||||||
o treats CONNECT 407 responses with bodies better during Digest/NTLM auth
|
o treats CONNECT 407 responses with bodies better during Digest/NTLM auth
|
||||||
o improved strerror_r() API guessing when cross-compiling
|
o improved strerror_r() API guessing when cross-compiling
|
||||||
o debug builds work on Tru64
|
o debug builds work on Tru64
|
||||||
@ -40,6 +41,6 @@ This release would not have looked like this without help, code, reports and
|
|||||||
advice from friends like these:
|
advice from friends like these:
|
||||||
|
|
||||||
John McGowan, Georg Wicherski, Andres Garcia, Eric Cooper, Todd Kulesza,
|
John McGowan, Georg Wicherski, Andres Garcia, Eric Cooper, Todd Kulesza,
|
||||||
Tupone Alfredo, Gisle Vanem, David Shaw, Andrew Bushnell
|
Tupone Alfredo, Gisle Vanem, David Shaw, Andrew Bushnell, Dan Fandrich
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
@ -236,9 +236,20 @@ static time_t Curl_parsedate(const char *date)
|
|||||||
struct tm tm;
|
struct tm tm;
|
||||||
enum assume dignext = DATE_MDAY;
|
enum assume dignext = DATE_MDAY;
|
||||||
const char *indate = date; /* save the original pointer */
|
const char *indate = date; /* save the original pointer */
|
||||||
|
|
||||||
int part = 0; /* max 6 parts */
|
int part = 0; /* max 6 parts */
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
/*
|
||||||
|
* On Windows, we need an odd work-around for the case when no TZ variable
|
||||||
|
* is set. If it isn't set and "automatic DST adjustment" is enabled, the
|
||||||
|
* time functions below will return values one hour off! As reported and
|
||||||
|
* investigated in bug report #1230118.
|
||||||
|
*/
|
||||||
|
const char *env = getenv("TZ");
|
||||||
|
if(!env)
|
||||||
|
putenv("TZ=GMT");
|
||||||
|
#endif
|
||||||
|
|
||||||
while(*date && (part < 6)) {
|
while(*date && (part < 6)) {
|
||||||
bool found=FALSE;
|
bool found=FALSE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user