Enforce RFC 7230 Validation for Apex RestResponse Headers

Salesforce is alerting customers with the following message for Spring 24

Enforce RFC 7230 Validation for Apex RestResponse Headers

  1. Apex that invokes the RestResource.addHeader(name, value) method, with a header name that isn’t RFC 7230-compliant results in a runtime exception of type InvalidHeaderException.
  2. Before activating this update in production, check with your package providers to make sure that all your installed packages are compatible.
  3. There is no use of RestResponse.addHeader(name, value) in the instance, just need to confirm with the Package providers.

 

We have run code scans and checks and are currently not aware of any issues.  Nor, have we had any customers report any issues.

Please book mark this FAQ and check back.  We will update this FAQ if we learn of any new updates.