-
Notifications
You must be signed in to change notification settings - Fork 5
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
Rewrite for new proposed VRB_Iterate() API #9
Draft
nigoroll
wants to merge
24
commits into
Refinitiv:master
Choose a base branch
from
nigoroll:vrb_iterate
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vmods are banned from cache_param for quite some time now, so the vmod should have its own parameter for the gzip buffer size.
Much more can be done here to reduce the required varnish internal headers, but for now this commit concludes the required changes for varnish-cache master as of now (post 7.1)
varnish-cache serializes the vmod events, so, unless the vmod itself has any concurent access, no mutex is required.
See varnishcache/varnish-cache#3798 (comment) Changes: * need std.cache_req_body() now Unless the request body is only used by the soap vmod (that is, whenever it is to be sent to the backend also), std.cache_req_body(), optionally with the partial argument, needs to be used to cache at least as much of the request body to fulfil any xml lookup used. Partial caching can be used if, for example, only the XML header is read and the header is known to be placed at the top. * VCL is now responsible for checking Content-Encoding ... because it could push filters to support other Content-Encodings * Varnish Cache supports chunked Encoding for bodies The test for a body with no Content-Length and no Chunked-Encoding did not make sense, request bodies could never be closed with "EOL" semantics (write side shutdown), not even in HTTP/1.0 https://www.rfc-editor.org/rfc/rfc1945.html#section-8.3 A valid Content-Length is required on all HTTP/1.0 POST requests. * Polish vcc file $ABI is implicitly required by varnish-cache as of af87f0cd1a7b8be8a124dca355f04dd641bc5512 The $Module quotes are currently not required.
As of now, the response body must be uncached.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have spent quite a relevant amount of time to adopt the vmod to the new proposed VRB_Iterate() interface, just to find out that the VMOD does not actually fit my requirements because I do need raw XML parsing. But I have learned a lot on the way and hopefully we will get the improved interface which is useful in its own right.
Anyway, I am dropping my work here in case it can later be picked up again or be of use in any other way.
This series of patches implements the following changes:
VRB_Iterate()
interface, see commit message of 1cd6768 for details