-
Notifications
You must be signed in to change notification settings - Fork 56
gzip not supported? #97
Comments
This codebase does not explicitly handle gzip, and it doesn't immediately appear to be supported in hapi's |
The npm registry recently made the same change This caused our Kappa registry to start throwing errors in Wreck ( |
We were bitten by this yesterday, too. Published a new build at around 3am EST in the always-attempt-gzip branch. Published as Not yet merged into |
@jasisk Looks like npm is not aware of your published version: |
That's just the $ npm info kappa dist-tags
{ latest: '1.0.0-rc.11', rc: '1.0.0-rc.14' } |
Oh, cool. Thanks. Will try it out. I don't see that errors by the way, but just sudden slowness of all requests. |
slowness by way of client? That could be the client retrying on error (the npm client retries requests a couple of times before it gives up). Your kappa logs will probably show a 500 or two each time it seems slow. |
Looking at the linked npm thread, it looks like they are now correctly parsing the As a result, I may back out the change and implement it correctly. I'll follow up with some of the npm folks and see what they think. |
Yeah, about that :) this log level:
seems to have no effect. |
We log out using the standard hapi logging events, consumable by good. The versions we use are way out of date but they still work. Here's an example of how to configure for logging (you'll need to install |
Thanks a lot. |
@jasisk This is what I see in the logs:
|
Even though npm said they fixed all the changes, the older version of Kappa still doesn't work. The new version works flawlessly. The old version still fails, and I think it is due to how Kappa passes along the client npm version in the requests. It sounds like the npm team decided to simply revert to the old strategy by checking for older client versions, but if your local npm client is a recent enough version it will cause the server to assume it can serve gzipped content, even though the proxy itself can't handle it. I assume this means those using older Kappa installs will have it permanently broken (when using recent npm clients), but that is just a guess. Time to upgrade! |
Yup. It's due to the fact that in the version of the npmjs.com registry prior to the one deployed the other night, gzip wasn't supported, so we didn't support it either. Additionally, we try to do as little munging of the original request as possible so we previously shuttled along the request headers basically as is (minus a few things like authorization headers, etc). Interestingly, the npm client has supported gzip since 2014-03-18 with v1.4.5 (dep bump commit, npm-registry-client commit) but it was never enabled on registry.npmjs.com until the other day. So the problem was really two fold: on the one hand, npm initially turned on gzip without checking the The second problem is in kappa itself. Because we aimed to not mutate the request much, we blindly passed along the So the immediate, quick fix was to strip out the At this point, with npm changing their implementation to consider So that's why, despite rolling back the change, old versions of kappa won't work. Hope that helps explain it! 😀 |
Also, I'll be leaving this issue open until I strip out the header munging. We technically support gzip now but, with npm now respecting the |
recently the chinese npm mirror https://registry.npm.taobao.org enabled gzip, then our kappa server got 500 when proxy to this site.
here's our kappa.json:
do request with
Accept-Encoding: gzip
The text was updated successfully, but these errors were encountered: