-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Z_BUF_ERROR when using get on a gzip sitemap #3989
Copy link
Copy link
Closed
Description
Describe the issue
Using get to read a gzip sitemap from a third party link. This was working a week a ago, now i'm getting this error:
code:'Z_BUF_ERROR'
message:'unexpected end of file'
stack:'Error: unexpected end of file\n at Zlib.zlibOnError [as onerror] (zlib.js:182:17)\n at Zlib.callbackTrampoline (internal/async_hooks.js:126:14)'
Example Code
Code snippet to illustrate your question
let response = await axios.get(`${url}/th-sitemapIndex.xml.gz`, {
headers: {
'Accept': '*/*',
'Accept-Encoding': 'gzip, deflate, br'
}
});Expected behavior, if applicable
To be able to read the sitemap
Environment
- Axios Version 0.20.0
- Node.js Version 12.22.5
- OS: Windows 10
Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels