]> git.ipfire.org Git - thirdparty/cups.git/commit
scheduler: Fix sending response headers to client
authorzdohnal <zdohnal@redhat.com>
Fri, 5 Apr 2024 08:41:00 +0000 (10:41 +0200)
committerGitHub <noreply@github.com>
Fri, 5 Apr 2024 08:41:00 +0000 (10:41 +0200)
commitd934de2bea62ce7702fe4c19b0a1b5ffbb3e3068
tree3e921ca13dd86733b9e06b8c79e9cb5c39f67c9f
parent8dda6c2b210c556f08f9e04889d8b42fb534474c
parentd60341b3355fd8825bec00792f301ef99d715a93
scheduler: Fix sending response headers to client

Sometimes headers are not correctly copied into response to the client (some are missing). It happens because sent_header is set prematurely before the actual send happens. The present code in affected cupsdWriteClient() scope looks like code remains from CUPS 1.6.3, where cupsdSendHeader() is called earlier and generates the required headers by itself - the current cupsdSendHeader() sends only the headers which are saved in array fields, so the premature setting of sent_header sometimes causes not having all headers in the response.

With the change, testing via curl gives reliable results all time.