I have some dates that have a year before year 1000 and the _dump_date function doesn't represent them as zero filled to 4 so parsing the output with '%a, %d %b %Y %H:%M:%S %Z' throws an exception.
index b428ceeb..d233d0f2 100644
--- a/src/werkzeug/http.py
+++ b/src/werkzeug/http.py
@@ -882,7 +882,7 @@ def _dump_date(d, delim):
"Dec",
)[d.tm_mon - 1],
delim,
- str(d.tm_year),
+ str(d.tm_year).zfill(4),
d.tm_hour,
d.tm_min,
d.tm_sec,
I have some dates that have a year before year 1000 and the _dump_date function doesn't represent them as zero filled to 4 so parsing the output with '%a, %d %b %Y %H:%M:%S %Z' throws an exception.