morlovich commented on a change in pull request #1766: AddResourceHeader: 
always set. Ignore pre-existing values
URL: 
https://github.com/apache/incubator-pagespeed-mod/pull/1766#discussion_r182753430
 
 

 ##########
 File path: net/instaweb/rewriter/resource_fetch.cc
 ##########
 @@ -175,6 +175,7 @@ void ResourceFetch::HandleHeadersComplete() {
   for (int i = 0; i < driver_->options()->num_resource_headers(); ++i) {
     const RewriteOptions::NameValue* nv =
         driver_->options()->resource_header(i);
+    response_headers()->RemoveAll(nv->name);
     response_headers()->Add(nv->name, nv->value);
 
 Review comment:
   Just using ->Replace might be a little nicer. Not that it's implemented any 
different

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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