Event though WebCore cache has been taught to avoid caching XMLHttpRequests with Vary, this still happens in Safari. See also bug 58797, bug 71509, which are about mishandling Vary in other parts of WebCore cache.
Created attachment 147171 [details] proposed fix
Comment on attachment 147171 [details] proposed fix r=me
Committed <http://trac.webkit.org/changeset/120339>