-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add content negotiation filter #1052
Conversation
368856c
to
cfd53bc
Compare
782f5dd
to
992a19b
Compare
Change-Id: Iaa3bcee0b2f6b5b59b8b8716e861e76fc405137f
Change-Id: I8d6e0bc299ff2aeeb3e0e3d218fe766a2bbeefff
Change-Id: I9ebbeab5bc3e2180b59f9a13f735a39171b20a63
992a19b
to
fe69a68
Compare
This is completely completed, was tested in Vagrant and seems to work OK. Next step is merging it and deploying to Labs to test VE some more. After - coordinated deploy together with @wikimedia/parsing as it's the first time we do anything like this and a lot of caution is needed. |
return htmlRes; | ||
} | ||
|
||
if (semver.satisfies(storedVersion, requestedVersion)) { |
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.
This might be clearer as eq
since the requestedVersion
isn't a range.
But maybe you meant to use a partial or x-range (to ignore the patch)?
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.
We ignore the patch both in Varnish (by basically resetting the patch to 0) and in RESTBase
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.
You're saying that storedVersion
will also always have a sanitized patch level? In which case, use eq
. If not, you probably want to express requestVersion
as a range using partial or x-range.
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.
Right.. will make another pr
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.
Implements the protocol we've all agreed on in https://phabricator.wikimedia.org/T128040#4528109
Now we're supplying dummy
data-parsoid
to Parsoid to bypass validation, but @arlolra promised to fix that in Parsoid.cc @wikimedia/services @wikimedia/parsing