Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scheduler: Fix removing Server header from HTTP if requested #1116

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

zdohnal
Copy link
Member

@zdohnal zdohnal commented Dec 12, 2024

Fixes #1111

@michaelrsweet michaelrsweet linked an issue Dec 12, 2024 that may be closed by this pull request
Copy link
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, since ServerTokens supports default values (httpSetDefaultField), which is where the CUPS/major.minor string is coming from, the correct fix is to actually call httpSetDefaultField in scheduler/client.c's cupsdAcceptClient instead of httpSetField in cupsdSendHeader.

Use `httpSetDefaultField()` in `cupsdAcceptClient()` to do the trick.

Fixes OpenPrinting#1111
@zdohnal
Copy link
Member Author

zdohnal commented Dec 16, 2024

@michaelrsweet thx! The PR updated accordingly.

Copy link
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@zdohnal zdohnal merged commit 98ba14b into OpenPrinting:2.4.x Dec 17, 2024
5 of 6 checks passed
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.

CUPS ignores "ServerTokens None" option.
2 participants