httpheader: fix GetVersionError usage

This commit is contained in:
lilydjwg 2024-03-09 18:28:44 +08:00
parent 9784e64307
commit c53952c75c
1 changed files with 5 additions and 1 deletions

View File

@ -29,7 +29,11 @@ async def get_version_impl(info):
header_value = res.headers.get(header)
if not header_value:
raise GetVersionError('header %s not found or is empty' % header)
raise GetVersionError(
'header not found or is empty',
header = header,
value = header_value,
)
try:
version = regex.findall(header_value)