Lofesa commented on issue #1953: Add x content type options nosniff to ipro
URL: 
https://github.com/apache/incubator-pagespeed-mod/pull/1953#issuecomment-583720776
 
 
   @jmarantz Bad news. 
   Setting `if (strings::EndsWIth(url, ".js") || strings::EndsWith(url, 
".css")) {` in 
https://github.com/apache/incubator-pagespeed-mod/blob/b3349ab11b9a6345f589fba244fcfbc11af69a5a/net/instaweb/rewriter/in_place_rewrite_context_test.cc#L367
   
   make some test fail cause the nosniff header is empt.
   Seems that `FetchAndCheckResponse` is called before call to 
`FixFetchFallbackHeaders`, so the header is not added  in test. But I don“t 
find where `FixFetchFallbackHeaders` is called in test.
   
   I have put a std:cout in in_place_rewrite_context.cc so (new line 423 in the 
PR) when the header is set, a string is echoed. Same with the` if 
(strings::EndsWIth(url, ".js") || strings::EndsWith(url, ".css")) {` in the 
`FetchAndCheckResponse`, then in the failed test I gave first the string from  
`FetchAndCheckResponse` and later the string from `FixFetchFallbackHeaders`.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to