Skip to content

Commit 9d488ba

Browse files
committed
fix: remove 'parse error' from output in successful Cache-Control response
Fixes #27
1 parent 36bf6dd commit 9d488ba

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

ready/checks/html.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,13 @@ def check_html_should_not_be_cached_for_more_than_24_hours(responses, **kwargs):
252252

253253
if "max-age=" in cc_header:
254254
max_age = re.search("max-age=(?P<age>\d+)", cc_header)
255+
255256
if max_age:
256257
try:
257258
age = int(max_age.group("age"))
258259
return result(
259260
age <= 86400,
260-
f"Cache-Control max-age should be <= 86400 for HTML documents (parse error: {cc_header})",
261+
f"Cache-Control max-age should be <= 86400 for HTML documents ({cc_header})",
261262
"html_cache_duration",
262263
**kwargs,
263264
)

ready/ready.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from importlib import resources
88
from . import checks as checks_module
99

10-
VERSION = "1.2.3"
10+
VERSION = "1.2.4"
1111

1212
from ready.checks.bad_response import (
1313
check_bad_response_cloudflare,

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = ready-check
3-
version = 1.2.3
3+
version = 1.2.4
44
author = Brenton Cleeland
55
author_email = [email protected]
66
description = A developer-friendly web scanning tool

0 commit comments

Comments
 (0)