The Vary header may contain invalid header name values. We should just
ignore such values as opposed to propagating them to the caller. Before
this patch, attempts to add a request with such a Vary header for example
would fail, since the internal QueryCache() call when executing the
CachePutAllAction would fail.
The Vary header may include one or more HTTP header field names, so we
need to extract those names here, similar to the way that the
nsHttpChannel::ResponseWouldVary() function consumes the Vary header.
This patch was generated by a script. Here's the source of the script for
future reference:
find . \( -iname "*.cpp" -o -iname "*.h" \) | \
xargs -n 1 sed -i "s/nsRefPtr<nsIRunnable>/nsCOMPtr<nsIRunnable>/g"