New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed decompression for responses without Content-Length
header
#5306
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The line
const responseLength = +res.headers['content-length'];
will still result in NaN
for the responseLength
which is then used for the download progress.
Does it make sense to show progress if no length is available?
That is previously working code, it handles NaN.
Of course, the length may not be present when the ProgressEvent emits. |
Does this also close #5311 ? |
@karlhorky Unlikely. This PR fixes the regression bug with response decompression in v1.2.0, but it looks like that issue is related to request failure. |
Hi @DigitalBrainJS I can confirm that 1.2.0-alpha.1 fixes the observations I made of uncompressed data in #5314 |
Yeah If @jamesmortensen also confirms that |
@jasonsaayman Can we have a patch release with this? |
Yeah sure, I will get to this one asap |
Any time... |
When we can expect the new release 1.2.1? |
I am working on that, might be a 1.3.0 in all honesty |
@jasonsaayman IMHO hotfixes are best released separately from minor changes, as such releases have a higher priority. This is more reliable because we can fix one thing but break another, probably not covered by tests, and the whole release becomes useless. Therefore, if we have a broken minor release (with a critical regression bug), we should release a patch to fix it, and only then publish a minor release with other changes. |
So I did want to point out that semantic version number wise, this prerelease probably should have been because when comparing versions: Not really a big deal right now testing this, but thought I'd mention. You can see if you do the following:
|
@mlippert No, it doesn't fix the issue. It's just the last working version before |
Sorry, didn't realize that's what that release was. I just tried it and the failure I was seeing didn't occur, but that was the regression. I thought that release was a proposed fix. So that was the same as my re-installing |
Sorry for the noise but any updates on a patch release? This is a non-obvious, app-breaking bug that wastes a lot of time tracking down. The only fix is to either disable decompression or downgrade, so it's a bit awkward that it's taking this long to get a patch out. I know people are busy, but I don't really think this is a back-burner kind of bug 😅 |
@MidnightTinge Unfortunately, this doesn't depend on me since I'm not a repo/npm collaborator. The only hope is that @jasonsaayman can find some time to make a release. For now, you can use the previous alpha version, as it is almost the same as this one, but working :) |
This is a terrible approach to semantic versioning that seems prevalent since v1.0.0. You seem to be continuously leaving a slew of broken minor releases in your wake. Anyone using Please do your users a favour and do patch releases. |
I will release it tonight, I will also release it as 1.2.1. I will also try to get to these quicker in the future. @philBrown thanks for that observation, there have been multiple issues fixed in those releases. Also whenever there is a type change I prefer to bump the minor otherwise there will be a lynch mob of people coming at me with threats or hate speech. It has been a rocky start to v1.x but I believe we are moving things in the right direction. I will try please as many people with versioning as I can but I can assure someone will hate what I do either way. |
@DigitalBrainJS I have been thinking about trying to get this done, I will probably look into it over the next while. I can also gran you a token to help with more, lets chat. |
@DigitalBrainJS I have elevated your access on this repo 😃 |
@jasonsaayman I would like to express my thanks and gratitude to all the work you do on this project. As a maintainer of a few projects myself, I know just how much time and energy it can consume. And many project maintainers are dong it of their own free will, without any payment whatsoever. I will definitely not be a member of or driving any lynch mob . Once again, thanks for the great work. |
content-length
header, avoidingZ_BUF_ERROR
;compress
encoding toAccept-Encoding
request header;HEAD
request;Accept-Encoding
header only if it is supportedCloses #5298
Closes #5296
Closes #5313;
Closes #5314;
Closes #5315;
Suggested release:
1.2.1