Hello!
2013/2/20 Collin/hug:
> 春哥,
>
> 请教另外一个问题,我想通过ngx_http_subrequest这个函数去下载文件,
> ngx_int_t ngx_http_subrequest(ngx_http_request_t *r,
> ngx_str_t *uri, ngx_str_t *args, ngx_http_request_t **psr,
> ngx_http_post_subrequest_t *ps, ngx_uint_t flags)
> 但这个函数的uri要求是nginx conf中配置的location,我如何实现去下载任何一个url呢?
>
你需要同时配合使用标准的 ngx_proxy 模块。子请求机制工作在 C 层面上,而不是 HTTP 协议层面上,尽管其用户界面看起来有点儿像 HTTP :)
同时抄送给 openresty 中文邮件列表:http://openresty.org/#Community
建议加入此列表并在那里讨论这样的问题,谢谢合作 :)
Best regards,
-agentzh