Hi,
I noticed that requests initiated via `ngx.location.capture` does not go through access phase. You can replicate it with the following example configuration
```
daemon off;
worker_processes 1;
error_log logs/error.log debug;
events {
worker_connections 1024;
}
http {
lua_need_request_body on;
server {
location /lua {
resolver 8.8.8.8;
default_type text/html;
rewrite_by_lua_block {
local res = ngx.location.capture("/access")
ngx.print(res.body)
ngx.exit(ngx.HTTP_OK)
}
access_by_lua_block {
ngx.log(ngx.WARN, "XIYAR, I'm acccess phase in /lua")
}
content_by_lua_block {
ngx.say("yoo")
}
}
location /access {
rewrite_by_lua_block {
ngx.log(ngx.WARN, "XIYAR, I'm rewrite phase in /access")
}
access_by_lua_block {
ngx.log(ngx.WARN, "XIYAR, I'm acccess phase in /access")
}
content_by_lua_block {
ngx.say("ACCESS")
}
}
location / {
root html;
index index.html index.htm;
}
}
}
```
When I execute
```
> ~$ curl localhost/access
ACCESS
```
In the logs I see
```
> nginx-lua-experiments$ tail -f logs/error.log | grep XIYAR
2017/11/30 13:50:53 [warn] 50772#0: *2 [lua] rewrite_by_lua(nginx.conf:33):2: XIYAR, I'm rewrite phase in /access, client: 127.0.0.1, server: , request: "GET /access HTTP/1.1", host: "localhost"
2017/11/30 13:50:53 [warn] 50772#0: *2 [lua] access_by_lua(nginx.conf:37):2: XIYAR, I'm acccess phase in /access, client: 127.0.0.1, server: , request: "GET /access HTTP/1.1", host: "localhost"
```
But when I execute
```
> ~$ curl localhost/lua
ACCESS
```
I only see
```
2017/11/30 13:51:07 [warn] 50772#0: *3 [lua] rewrite_by_lua(nginx.conf:33):2: XIYAR, I'm rewrite phase in /access, client: 127.0.0.1, server: , request: "GET /lua HTTP/1.1", subrequest: "/access", host: "localhost"
```
whereas I expected to see "XIYAR, I'm acccess phase in /access" in the log too.
My question is this an expected behaviour or a bug? I could not find it documented at https://github.com/openresty/lua-nginx-module#ngxlocationcapture.