scorecard: more upload options

`--upload-no-cl` for uploads without "Content-Length:"
`--upload-parallel=1` for testing only serial uploads

Closes #20035
This commit is contained in:
Stefan Eissing 2025-12-19 13:06:34 +01:00 committed by Daniel Stenberg
parent 0f7b182f2f
commit 4ec7136010
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 31 additions and 14 deletions

View file

@ -784,6 +784,7 @@ class CurlClient:
with_stats: bool = True,
with_headers: bool = False,
with_profile: bool = False,
suppress_cl: bool = False,
extra_args: Optional[List[str]] = None):
if extra_args is None:
extra_args = []
@ -798,6 +799,11 @@ class CurlClient:
extra_args.extend([
'-w', '%{json}\\n'
])
if suppress_cl:
extra_args.extend([
'-H', 'Content-Length:',
'-H', 'Transfer-Encoding: chunked',
])
return self._raw(urls, intext=data,
alpn_proto=alpn_proto, options=extra_args,
with_stats=with_stats,