canjs / can-zone

A context for tracking asynchronous activity in JavaScript applications.
https://v4.canjs.com/doc/can-zone.html
MIT License
92 stars 4 forks source link

fix: relative urls not matching XHR_CACHE #166

Closed cleong-tc closed 6 years ago

cleong-tc commented 6 years ago

@Qirui_Sun found that relative-urls (i.e. done-ssr proxy-request) were not matching requests in XHR_CACHE because requests in XHR_CACHE have absolute-urls.

the fix is to check if url is a relative-url (i.e. url starts with a slash) then strip everything before pathname in request.url.