Skip to content

Say which extra headers the copy will not send - #258

Open
xroche wants to merge 1 commit into
masterfrom
warn-dropped-headers
Open

xroche wants to merge 1 commit into
masterfrom
warn-dropped-headers

Conversation

@xroche

@xroche xroche commented Oct 22, 2026

Copy link
Copy Markdown
Owner

The engine refuses some -%X header lines. It drops a framing header it sets itself, a line that names no header, and all but the last of Host, Cookie and Authorization. It explains each one with fprintf on stderr, which this app discards. So a header the user typed was never sent and nothing said why.

Leaving the Browser ID page now names each dropped line.

The engine's two lists are copied here, which is the part that can rot. The test reads them back out of the pinned engine source and compares. Changing the engine's own array turns it red, so a pin bump cannot move the list quietly.

Asking the engine instead would be better and is not available. http_custom_header_warning returns exactly this verdict. But it sits inside #ifdef HTS_INTERNAL_BYTECODE and carries no HTSEXT_API, so our translation unit cannot see it and libhttrack does not export it. A JNI wrapper fails to compile. If the engine promotes it, this class should call it and drop the copy.

A profile loaded from winprofile.ini never passes through this page, so its headers go unchecked.

The engine refuses a framing header on -%X, refuses a line that names no
header, and keeps only the last of Host, Cookie and Authorization. It
says why with fprintf on stderr, which this app discards, so a header
the user typed was silently never sent and nothing explained it. Leaving
the Browser ID page now names each dropped line.

The engine's two lists are copied here, which is the part that could rot,
so the test reads them back out of the pinned engine source and compares.
Changing the engine's own array turns it red, so a pin bump cannot move
the list quietly.

Asking the engine instead would have been better and is not available.
http_custom_header_warning returns exactly this verdict, but it is
declared inside #ifdef HTS_INTERNAL_BYTECODE and carries no HTSEXT_API,
so it is neither visible to our translation unit nor exported from
libhttrack for libhtslibjni to call. A JNI wrapper fails to compile. If
the engine ever promotes it, this class should call it and drop the copy.

A profile loaded from winprofile.ini never passes through this page, so
its headers go unchecked.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <xroche@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant