Do not modify the update URL if it contains a query string. Fix #1000.

This commit is contained in:
FelisCatus 2017-03-01 01:24:40 -05:00
parent 31a39397c3
commit 80b668a47e

View File

@ -6,7 +6,7 @@ ContentTypeRejectedError = OmegaTarget.ContentTypeRejectedError
xhrWrapper = (args...) -> xhrWrapper = (args...) ->
xhr(args...).catch (err) -> xhr(args...).catch (err) ->
throw err unless err.isOperational throw err unless err.isOperational
if not err.statusCode? if not err.statusCode
throw new OmegaTarget.NetworkError(err) throw new OmegaTarget.NetworkError(err)
if err.statusCode == 404 if err.statusCode == 404
throw new OmegaTarget.HttpNotFoundError(err) throw new OmegaTarget.HttpNotFoundError(err)
@ -26,7 +26,7 @@ fetchUrl = (dest_url, opt_bypass_cache, opt_type_hints) ->
'Unrecognized Content-Type: ' + contentType) 'Unrecognized Content-Type: ' + contentType)
return body return body
if opt_bypass_cache if opt_bypass_cache and dest_url.indexOf('?') < 0
parsed = Url.parse(dest_url, true) parsed = Url.parse(dest_url, true)
parsed.search = undefined parsed.search = undefined
parsed.query['_'] = Date.now() parsed.query['_'] = Date.now()