// Prefer X-PJAX-URL header if it was set, otherwise fallback to
// using the original requested url.
var serverUrl = xhr.getResponseHeader('X-PJAX-URL')
obj.url = serverUrl ? stripInternalParams(parseURL(serverUrl)) : options.requestUrl
+ if (!xhr.getResponseHeader('Content-Type').match(/^text\/html/i))
+ return obj;
If download a file, pjax will happen.
So I solved it in the same way as above.