MCPcopy
hub / github.com/django/django / parse_http_date_safe

Function parse_http_date_safe

django/utils/http.py:140–147  ·  view source on GitHub ↗

Same as parse_http_date, but return None if the input is invalid.

(date)

Source from the content-addressed store, hash-verified

138
139
140def parse_http_date_safe(date):
141 """
142 Same as parse_http_date, but return None if the input is invalid.
143 """
144 try:
145 return parse_http_date(date)
146 except Exception:
147 pass
148
149
150# Base 36 functions: useful for generating compact URLs

Callers 3

get_conditional_responseFunction · 0.90
process_requestMethod · 0.90
process_responseMethod · 0.90

Calls 1

parse_http_dateFunction · 0.85

Tested by

no test coverage detected