@@ -123,4 +138,4 @@
swh.save.initOriginSave();
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/swh/web/tests/common/test_origin_save.py b/swh/web/tests/common/test_origin_save.py
--- a/swh/web/tests/common/test_origin_save.py
+++ b/swh/web/tests/common/test_origin_save.py
@@ -408,7 +408,20 @@
origin_url=url,
exists=True,
content_length=10,
- last_modified="Sun, 21 Aug 2011 16:26:32 GMT",
+ last_modified="2011-08-21T16:26:32",
+ )
+
+
+def test_origin_exists_200_with_data_unexpected_date_format(requests_mock):
+ """Existing origin should be ok, unexpected last modif time result in no time"""
+ url = "http://example.org/real-url2"
+ requests_mock.head(
+ url, status_code=200, headers={"last-modified": "Sun, 21 Aug 2021 16:26:32",},
+ )
+
+ actual_result = origin_exists(url)
+ assert actual_result == OriginExistenceCheckInfo(
+ origin_url=url, exists=True, content_length=None, last_modified=None,
)