-
Notifications
You must be signed in to change notification settings - Fork 376
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
Turn a POST req into two HEAD then POST bereqs #1948
Comments
This sounds like #1936 |
Also #1927. In any case, you still need to cache the request body if you are going to restart.
Regardless of being around pass the former still applies. |
I'm well aware that this is not supposed to work. With Varnish 4 it's an immediate fail, which is better than 4.1+ where the test hangs until it reaches the test timeout. And because the test doesn't fail instantly I have this tiny hope that it could become legit :) Anyway, there's at least something to fix/improve. |
Backport update: OP confirms that this fails instantly on 4.1. No fix, nothing to backport. |
This is a followup of #1943 after the question was raised on IRC whether sending the first request as HEAD would leave the body untouched and allow a POST with a body to be carried after a restart (without using the std module).
Making sure to remove the
Content-Length
header removed the initial error (Uncached req.body can only be consumed once) but it still doesn't work.Expected Behavior
I don't know what to expect. Ideally the test should pass.
Current Behavior
Currently the test times out on 4.1 and master branches,
s1
receives both HEAD and POSTbereq
and waits for the body. It fails on 4.0: varnish closes the backend connection after sending the POSTbereq
headers.Enabling the
send
command doesn't change anything on 4.1 and master.I haven't looked hard at what's happening, I'm reporting it before I lose the test case.
Steps to Reproduce
Context
I believe the goal in the original request is to check in Varnish that a user is logged in before and then handle the original request using
return (restart)
. This is something I hold dear (vanilla VCL without VMODs) but I always limited this varnish-level check for cacheable GET requests for obvious reasons, lettingpass
'ed requests deal with that at the backend level.However I don't see any reason not to generalize this kind of checks for all requests. I tend to make GET backend requests (instead of HEAD) and cache them, but it doesn't change anything wrt the body.
Your Environment
The text was updated successfully, but these errors were encountered: