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.
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 affectedcupsdWriteClient()
scope looks like code remains from CUPS 1.6.3, wherecupsdSendHeader()
is called earlier and generates the required headers by itself - the currentcupsdSendHeader()
sends only the headers which are saved in arrayfields
, so the premature setting ofsent_header
sometimes causes not having all headers in the response.With the change, testing via curl gives reliable results all time.