You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Touchpoints is a Rack app and the Rack code deliberately deletes the Content-Type header for 304 responses.
In the cloud.gov code
Touchpoints is deployed on cloud.gov. I don't know much about the internals of cloud.gov but I'm guessing that the proxy defined in this repo is sitting in front of the Touchpoints app and is adding a default content-type header to our 304 response.
In Chrome
Chrome recently introduced a new security feature https://chromestatus.com/feature/5166834424217600. On the feature page, it is listed as "In development" but I'm pretty sure it has actually been deployed and fully rolled out. The new feature is not very well documented IMO but the spec has this line - "If nosniff is true and mimeType's essence is 'text/plain', then return false" - which I think explains where the net::ERR_BLOCKED_BY_ORB error is coming from.
Acceptance Criteria
cloud.gov-hosted applications should be able to return 304 responses without content-type headers and still work in Chrome.
I may be biased but I think Touchpoints's behavior is above board here. The HTTP spec recommends limiting headers returned for 304 responses.
I defer to the cloud.gov team as to whether or not this is a Chrome bug vs. something that could be fixed in cloud.gov.
The text was updated successfully, but these errors were encountered:
Have you noticed this behavior elsewhere or is it observed specifically with Touchpoints?
No, I haven't. It requires a pretty specific set of circumstances to reproduce and I don’t know enough about what is deployed on cloud.gov to have an idea of where these circumstances might be replicated. I would need to find:
A page that makes a cross-origin request to a resource hosted on cloud.gov, where
(Probably) the request is for dynamic content (since it returns HTTP status 304 rather than being fulfilled immediately from the cache), and
The request is not a script-initiated request (because Chrome hasn’t implemented ORB for these requests yet, though they say that they plan to, see Intent to Ship).
My proposal is that this proxy not add default Content-Type headers to empty-body responses, or (more limited) not add them to responses with status codes that don't permit bodies (204, 304), or (even more limited and all we really need on Touchpoints) just not add them to 304 responses.
After deploying #86 to production, I cannot reproduce the original behavior. @sanason has confirmed separately that the fix is working. This ticket can be closed.
HTTP status 304 responses returned by our cloud.gov-hosted application are not loading correctly in Chrome.
Notes
Steps to reproduce (Chrome Version 125.0.6422.142 (Official Build) (arm64))
My theory of what's going on
In the Touchpoints code
Touchpoints is a Rack app and the Rack code deliberately deletes the
Content-Type
header for 304 responses.In the cloud.gov code
Touchpoints is deployed on cloud.gov. I don't know much about the internals of cloud.gov but I'm guessing that the proxy defined in this repo is sitting in front of the Touchpoints app and is adding a default content-type header to our 304 response.
In Chrome
Chrome recently introduced a new security feature https://chromestatus.com/feature/5166834424217600. On the feature page, it is listed as "In development" but I'm pretty sure it has actually been deployed and fully rolled out. The new feature is not very well documented IMO but the spec has this line - "If nosniff is true and mimeType's essence is 'text/plain', then return false" - which I think explains where the
net::ERR_BLOCKED_BY_ORB
error is coming from.Acceptance Criteria
I may be biased but I think Touchpoints's behavior is above board here. The HTTP spec recommends limiting headers returned for 304 responses.
I defer to the cloud.gov team as to whether or not this is a Chrome bug vs. something that could be fixed in cloud.gov.
The text was updated successfully, but these errors were encountered: