On Sun, Aug 10, 2014 at 2:41 AM, Yichun Zhang (agentzh)
<age...@gmail.com> wrote:
> 2014-08-09 11:13 GMT-07:00 Yichun Zhang (agentzh):
>>
>> 如果你 google 一下这条错误消息,你应当会在 google 的第一条结果里看到我先前在这个列表里其实早回答过你这个问题:
>>
>> https://groups.google.com/d/msg/openresty/VaNGHmM7vxA/gW4LftT6JyUJ
>>
>
各种原因 俺现在 尽力使用 duckduckgo.com 进行搜索了
不过,这一线索的确是前年学习 OpenResty 时俺吼的:
ngx_lua 中访问远方 HTTP 服务的两种推荐的做法 (Was Re: [openresty:157] 42分钟,乱入 OpenResty 手册!-))
也收录到了手册中:
替换 luacurl 回归非阻塞 — chaos2openResty 2.1.130619 documentation
http://chaos2.qiniudn.com/openresty/build/html/ch03/cook1.html
只是当年,的确问题用 ugly 的方法解决了,也就没有深入.
> James Hurst 的 lua-resty-http 库的文档中的“Synopsis”一节里的代码示例确实不够完整,我刚给他提了一个
> pull request,完善了一下那里的代码示例:
>
> https://github.com/pintsized/lua-resty-http/pull/18/files
>
> 加上了 resolver 配置指令和恰当的错误处理。
现在春哥一提醒,发现已经有当年期待的对应简化模块,
只是少了模块外的一行配置.
location ~ ^/=/(\w+) {
resolver 8.8.8.8; # use Google's open DNS server for an example
content_by_lua_file conf/lua/$1.lua;
lua_code_cache off;
}
加上,一切KO...
本地测试就有了全新的汇报:
$ curl -d "uri=https://docs.google.com/forms/d/1TBJNar54XKhMu_nRaES5ByPv0078hh0GV0sD5JPCZGU/viewform"
23.239.0.15:10080/=/gl
request_method: POST
args.uri: https://docs.google.com/forms/d/1TBJNar54XKhMu_nRaES5ByPv0078hh0GV0sD5JPCZGU/viewform
uri https://docs.google.com/forms/d/1TBJNar54XKhMu_nRaES5ByPv0078hh0GV0sD5JPCZGU/viewform
data longUrl=https://docs.google.com/forms/d/1TBJNar54XKhMu_nRaES5ByPv0078hh0GV0sD5JPCZGU/viewform
{"error":{"errors":[{"domain":"global","reason":"sslRequired","message":"SSL
is required to perform this operation."}],"code":403,"message":"SSL is
required to perform this operation."}}
感谢!
有了坚持的基点 ;-)
--
人生苦短, Pythonic! 冗余不做,日子甭过!备份不做,十恶不赦!
KM keep growing environment culture which promoting organization be learnning!
俺: http://zoomquiet.io
许: http://creativecommons.org/licenses/by-sa/2.5/cn/