Repository navigation
Why is the value for ther "--header" option limited in length? #6611
|
Passing any value larger than 1024 characters to the "--header" option results in the command failing. |
Replies: 1 comment 1 reply
|
The 1024-character cap is intentional and enforced in the client. In constexpr size_t WindowsPackageManagerHeaderMaxLength = 1024;
...
THROW_HR_IF(APPINSTALLER_CLI_ERROR_CUSTOMHEADER_EXCEEDS_MAXLENGTH,
customHeader.value().size() > WindowsPackageManagerHeaderMaxLength);The same limit is written into the original design spec (#893 – Support for arbitrary HTTP header for Rest sources): “The header can have a maximum length of 1024 characters.”
So for a ~3000-character payload you cannot raise the limit from the CLI today — it is a compile-time constant. Options:
|
The 1024-character cap is intentional and enforced in the client.
In
src/AppInstallerRepositoryCore/Rest/RestClient.cpp:The same limit is written into the original design spec (#893 – Support for arbitrary HTTP header for Rest sources): “The header can have a maximum length of 1024 characters.”
--headeris not a general HTTP header injector. Whatever you pass is sent as the value of a single header namedWindows-Package-Managerto a REST source. The cap keeps that value bounded for log…