[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tlsdate/master] Describe what an HTTP date is
commit 0c085d991f65af84ed838007fbd5d6af51cb5e6f
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
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",
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits