[tor-commits] [tlsdate/debian-master] Describe what an HTTP date is
ioerror at torproject.org
ioerror at torproject.org
Thu Oct 31 10:51:32 UTC 2013
commit 0c085d991f65af84ed838007fbd5d6af51cb5e6f
Author: Nick Mathewson <nickm at torproject.org>
Date: Thu Oct 10 15:08:30 2013 -0400
Describe what an HTTP date is
---
src/tlsdate-helper.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/tlsdate-helper.c b/src/tlsdate-helper.c
index 2a92195..2e0e2fb 100644
--- a/src/tlsdate-helper.c
+++ b/src/tlsdate-helper.c
@@ -223,6 +223,15 @@ handle_date_line(const char *dateline, uint32_t *result)
struct tm tm;
int i;
time_t t;
+ /* We recognize the three formats in RFC2616, section 3.3.1. Month
+ names are always in English. The formats are:
+
+ Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
+ Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
+ Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
+
+ Note that the first is preferred.
+ */
static const char *MONTHS[] =
{ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
More information about the tor-commits
mailing list