From 4b13e320bb2c59b2f1e912231a5b4575b59f83e8 Mon Sep 17 00:00:00 2001 From: "suresh%netscape.com" Date: Fri, 28 Feb 2003 21:54:57 +0000 Subject: [PATCH] bug 173867 - http expires header with date-in-past causes miscalculation. r-dougt, sr-darin. --- netwerk/protocol/http/src/nsHttpResponseHead.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/netwerk/protocol/http/src/nsHttpResponseHead.cpp b/netwerk/protocol/http/src/nsHttpResponseHead.cpp index 0847c216a1a..4d084c793f7 100644 --- a/netwerk/protocol/http/src/nsHttpResponseHead.cpp +++ b/netwerk/protocol/http/src/nsHttpResponseHead.cpp @@ -517,7 +517,10 @@ nsHttpResponseHead::GetExpiresValue(PRUint32 *result) return NS_ERROR_NOT_AVAILABLE; } - *result = PRTimeToSeconds(time); + if (LL_CMP(time, <, LL_Zero())) + *result = 0; + else + *result = PRTimeToSeconds(time); return NS_OK; }