You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If previous_response is included on a request to a paginated static data endpoint, and the ETags match, no items past the first page will be returned.
letfirst=awaitESI.request("/v1/universe/types/");console.log(first.data.length);// Around 36k itemsletsecond=awaitESI.request("/v1/universe/types/",{previous_response: first});console.log(second.data.length);// Exactly 1000, 1 page worth of items
This happens because ESI's static data endpoints will not include the x-pages header in 304 responses, causing the library to assume there is only one page of data. By doing this, ESI is following https://tools.ietf.org/html/rfc2616#section-10.3.5, which is now obsolete, and may be considered to be breaking https://tools.ietf.org/html/rfc7232#section-4.1, which supersedes the obsolete RFC.
esi/esi-issues#1104 is relevant here. This issue only happens with static data endpoints because they are still using weak ETags. If they were updated to use strong ETags like the rest of ESI, this shouldn't be an issue anymore, as ESI seems to include the x-pages header in 304 responses when strong ETags are used.
I have a couple of ideas for workarounds which would resolve this issue, but as mentioned in esi/esi-issues#1104, in their current state the ETags on static data endpoints are of very limited use, so I'm inclined to just wait for the switch to strong ETags be made in ESI, however long that might take.
The text was updated successfully, but these errors were encountered:
If
previous_response
is included on a request to a paginated static data endpoint, and the ETags match, no items past the first page will be returned.This happens because ESI's static data endpoints will not include the
x-pages
header in 304 responses, causing the library to assume there is only one page of data. By doing this, ESI is following https://tools.ietf.org/html/rfc2616#section-10.3.5, which is now obsolete, and may be considered to be breaking https://tools.ietf.org/html/rfc7232#section-4.1, which supersedes the obsolete RFC.esi/esi-issues#1104 is relevant here. This issue only happens with static data endpoints because they are still using weak ETags. If they were updated to use strong ETags like the rest of ESI, this shouldn't be an issue anymore, as ESI seems to include the
x-pages
header in 304 responses when strong ETags are used.I have a couple of ideas for workarounds which would resolve this issue, but as mentioned in esi/esi-issues#1104, in their current state the ETags on static data endpoints are of very limited use, so I'm inclined to just wait for the switch to strong ETags be made in ESI, however long that might take.
The text was updated successfully, but these errors were encountered: