Skip to content

Commit

Permalink
scheduler: Fix ServerTokens None
Browse files Browse the repository at this point in the history
Fixes #1111
  • Loading branch information
zdohnal committed Dec 17, 2024
1 parent 8f903bf commit 260d48a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ Changes in CUPS v2.5b1 (YYYY-MM-DD)
- Fixed `Host` header regression (Issue #967)
- Fixed DNS-SD lookups of local services with Avahi (Issue #970)
- Fixed debug printfs PID substitution support (Issue #1066)
- Fixed `ServerToken None` in scheduler (Issue #1111)
- Fixed CGI program initialization and validation of form checkbox and text
fields.
- Fixed finishing support in ippeveps.
Expand Down
10 changes: 7 additions & 3 deletions scheduler/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,13 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
con->serverport = httpAddrGetPort(&(lis->address));
}

/*
* Apply ServerHeader if any...
*/

if (ServerHeader)
httpSetDefaultField(con->http, HTTP_FIELD_SERVER, ServerHeader);

/*
* Add the connection to the array of active clients...
*/
Expand Down Expand Up @@ -2111,9 +2118,6 @@ cupsdSendHeader(
code = HTTP_STATUS_OK;
}

if (ServerHeader)
httpSetField(con->http, HTTP_FIELD_SERVER, ServerHeader);

if (code == HTTP_STATUS_METHOD_NOT_ALLOWED)
httpSetField(con->http, HTTP_FIELD_ALLOW, "GET, HEAD, OPTIONS, POST, PUT");

Expand Down

0 comments on commit 260d48a

Please sign in to comment.