Skip to content

Commit f1d54f5

Browse files
committed
Dont pass empty header
The OSF provider was passing a header with an empty value, this change means the if the header is empty, then the header isn't sent at all. This technically is a small optimization as well, it removes a few instructions that would get called inside aiohttp. if this header was here. (This is probably insignificant, however.)
1 parent d15d322 commit f1d54f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mfr/providers/osf/provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async def metadata(self):
7373
metadata_response = await self._make_request(
7474
'HEAD',
7575
download_url,
76-
headers={settings.MFR_ACTION_HEADER: self.action or ''}
76+
headers=({settings.MFR_ACTION_HEADER: self.action} if self.action else None)
7777
)
7878
response_code = metadata_response.status
7979
response_reason = metadata_response.reason

0 commit comments

Comments
 (0)