From 1789b717bab157a03ed5fcf448df035c59729cf7 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Tue, 22 Jan 2013 22:27:16 +0100 Subject: [PATCH] Remove support for RFC850 timestamps. RFC850 timeformat isn't y2k compliant. Furthermore, parsing turned out to be broken and it doesn't seem supporting the format is necessary anyway. Change-Id: I062e636a9e016ff1ac49d2a55f00adb1af182576 --- rbutil/rbutilqt/base/httpget.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rbutil/rbutilqt/base/httpget.cpp b/rbutil/rbutilqt/base/httpget.cpp index 58f6bd5e09..8005d4848b 100644 --- a/rbutil/rbutilqt/base/httpget.cpp +++ b/rbutil/rbutilqt/base/httpget.cpp @@ -361,9 +361,7 @@ void HttpGet::httpFinished(int id, bool error) date.remove(0, date.indexOf(" ") + 1); if(date.endsWith("GMT")) date.truncate(date.indexOf(" GMT")); // distinguish input formats (see RFC1945) - if(date.contains("-")) // RFC 850 - m_serverTimestamp = QLocale::c().toDateTime(date, "dd-MMM-yy hh:mm:ss"); - else if(date.at(0).isLetter()) // asctime format + if(date.at(0).isLetter()) // asctime format m_serverTimestamp = QLocale::c().toDateTime(date, "MMM d hh:mm:ss yyyy"); else // RFC 822 m_serverTimestamp = QLocale::c().toDateTime(date, "dd MMM yyyy hh:mm:ss"); -- 2.11.4.GIT