-
Notifications
You must be signed in to change notification settings - Fork 2k
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
HTTP/2 with location.capture() internal requests #1195
Comments
@wangchunpeng It's known that |
@agentzh very appreciated ! |
@agentzh sorry for bothering with this on this closed issue, but are you sure it does not work at all with HTTP/2? Maybe it is just related to |
@bjoe2k4 The thing is we have to make it fully working or just disable this altogether :) We don't have the time to dig this up, so if you would like to make this fully working, then please contribute a patch, which will be highly appreciated! |
Is there an alternative to "ngx.location.capture" with http/2? Commit 3078ca6 was a breaking change for me, and just like bjoe2k4, it was working perfectly. Before it was documented that ngx.location.capture was known to have issues with http/2 in some certain cases, but was not documented as slated for removal. Its complete, and abrupt, removal for use with http/2, with no apparent work-around other than disabling http/2, is certainly problematic. |
@agentzh I'm sure I'm not alone in the case that ngx.locationcapture with lua was one of the most compelling reasons to use openresty. If ngx.location.capture can't be fully fixed for HTTP/2, and there is no other viable alternative for loading and testing http requests while processing HTTP/2 requests, please give those of us that were comfortable working around the limitations some way to override the lock-out without having to resort to maintaining our own fork. |
I agree with Webifi. We also heavily depend on location.capture and location.capture_multi. Since there was no way for us to upgrade and use HTTP/2, we were also forced to fork the project. |
FWIW, we are switching from |
@prospekt22 No. We put it on its own listener (port) that is not publicly accessible. |
Does this problem exist now? I can't re-product it by using the newest Nginx with
my.lua
I'm sure the subrequest hit the cache. |
@mrpre The error code is still in master, which lua-nginx-module/src/ngx_http_lua_subrequest.c Lines 173 to 177 in f6b486b
|
@mrpre @Triple-Z As far as I can tell most clients won't actually negotiate an HTTP/2 connection unless SSL is enabled, so even though you think you are turning on HTTP/2 the client will likely ask for HTTP1.1 if the connection is unencrypted. I am not even sure if NGINX actually enables HTTP/2 if SSL is not also enabled. HTTP/2 and TLS are very closely bound. |
@agentzh Just wondering if is there any Doc that help explain why the |
nginx configured supporting http2,
when ngx.location,capture() method is called in a http2 post request as an internal request , if the internal request is hit the local cache, the whole request is blocked, and no data is send back to the client.
location = /internal/api {
internal;
proxy_method GET;
proxy_cache api_key;
proxy_cache_key api_$args;
proxy_pass backends_ip;
}
The text was updated successfully, but these errors were encountered: