jmarantz commented on a change in pull request #1695: 
OutputSanitizingAsyncFetch: runs right before PSOL responds
URL: 
https://github.com/apache/incubator-pagespeed-mod/pull/1695#discussion_r160146665
 
 

 ##########
 File path: net/instaweb/http/async_fetch.cc
 ##########
 @@ -276,6 +276,33 @@ void SharedAsyncFetch::HandleHeadersComplete() {
   base_fetch_->HeadersComplete();
 }
 
+OutputSanitizingAsyncFetch::OutputSanitizingAsyncFetch(AsyncFetch* base_fetch)
+    : SharedAsyncFetch(base_fetch) {
+  DCHECK(base_fetch != nullptr);
+}
+
+OutputSanitizingAsyncFetch::~OutputSanitizingAsyncFetch() {
+}
+
+bool OutputSanitizingAsyncFetch::SanitizeResponseHeaders() {
+  if (response_headers() != nullptr &&
+      response_headers()->RemoveAllWithPrefix("@")) {
 
 Review comment:
   can you put the "@" in a static class constant in Headers?
   
   there you can put doc that this is illegal from a protocol perspective 
(https://tools.ietf.org/html/rfc2616#page-31) 2.2 Basic Rules for 'token' 
excludes separators, including "@".  That's why we can use it as an in-memory 
sentinal as long as it is never serialized.

----------------------------------------------------------------
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