Monthly Archives: January 2010

ngx_memc v0.06: new directive memc_flags_to_last_modified

I’m pleased to announce the v0.06 release of the ngx_memc module:    http://wiki.nginx.org/NginxHttpMemcModule This release has the highlight of a new directive named "memc_flags_to_last_modified". If this directive is turned on, then for memcached get operations, ngx_memc will read the memcached … Continue reading

Posted in Uncategorized | Leave a comment

Commenting re-enabled on this blog site :)

I’ve just turned on the commenting permission on this site for I no longer have any fear of spam 😉

Posted in Uncategorized | Leave a comment

ngx_xss: Native support for cross-site scripting in an nginx

I’m delighted to announce the first release of our new module, ngx_xss. This output filter module adds native support for simple cross-site AJAX to the nginx server. Currently only cross-site GET is implemented, but cross-site POST support is on our … Continue reading

Posted in Uncategorized | Leave a comment

ngx_rds_json: help ngx_drizzle and other DBD modules emit JSON data

I’m happy to announce the first release of our ngx_rds_json module that can convert Resty DBD Streams (RDS) to JSON. As some of you might have noticed, the mysql/drizzle DBD driver module ngx_drizzle generates a specific binary stream in a … Continue reading

Posted in Uncategorized | 1 Comment

更多的关于咱们 nginx 新模块的有趣想法。。。

今天我和 Marcus Clyne 一直在讨论 ngx_list_var 模块的界面,我建议的最新的版本是这样的:   list_map "name=’$it’" $arg_names –to $names –sep ",";   list_join " or " $names –sep "," –to $condition; 这样对于 arg_names=dog,cat,tiger 的情形,我们可以在 $condition 里组出 SQL 条件   name=’dog’ or name=’cat’ or name=’tiger’ 其他模块还可以注册新的算子,以用于 list_map,比如 ngx_drizzle … Continue reading

Posted in Uncategorized | Leave a comment

利用 Erlang 编写的 TCP Proxy 工具 etcproxy 定位 ngx_drizzle 模块的一个 bug

阿哲老师(chaoslawful)的 Erlang 版 TCP proxy 工具 etcproxy,刚刚成功地帮我定位了 ngx_drizzle 模块中的一处隐秘的 bug,哈哈! 原来我在 ngx_http_drizzle_output.c 的函数组中的 size 局部变量都忘了初始化为 0 了。这种未初始的情形只有在 field 的 packet 被拆分时才会出现。我不用在测试 DB 里准备很大的 blob 数据来测试此种情况,而且非常可靠,每次都能精确复现场景。 定位 bug 的具体过程是这样的:我启动 etcproxy,让它的上游是本地 mysql server 监听的 3307,它自己监听 3306 端口,然后我让 nginx 去连 3306. 这样 etcproxy … Continue reading

Posted in Uncategorized | Leave a comment

关于 ngx_drizzle 和 ngx_rds 的一些随机的想法。。。

我终于想到了为我的 ngx_drizzle 模块再添加一条 drizzle_type 指令,这样用户可以自定义嵌入 SQL 的参数类型和正则约束,比如:   drizzle_type email ‘^[-A-Za-z0-9._]+\@\w+\.(?:com|cn|net)’ quote=on;   drizzle_quote $arg_email email;  drizzle_query "select * from users where email=$arg_email"; 这样内建类型 column, table, int, bool 啥的也可以让用户自己覆盖了,哈哈!ngx_drizzle 其实已经拥有了 OpenResty View API 的主要功能了,哈哈哈,而且更灵活,更高效! 我刚才吃早饭的时候,还想到可以为咱的二进制的 Resty DBD Stream (RDS) 格式再引入两种非结构化的查询结果类型 … Continue reading

Posted in Uncategorized | Leave a comment