请问在boby_filter 阶段, ngx.arg[1] 的最大buffer 怎么设置?

49 views
Skip to first unread message

MadClown

unread,
Jan 12, 2021, 9:32:23 PM1/12/21
to openresty
你好, 
    我有个需求是转换html中指定的字符串,  但是当response 较大时, 会被切成几个块传输,  这样就把我想要阶段的一个字符串切成了2次返回, 比如  www.google.com 切成了 www.goo  和gle.com, 请问有什么办法可以做到100%在lua阶段替换字符串吗?

Zhang Chao

unread,
Jan 12, 2021, 9:39:12 PM1/12/21
to MadClown, open...@googlegroups.com
你的字符串替换算法需要有流式处理的能力。

Chao Zhang
https://github.com/tokers

On January 13, 2021 at 10:32:27 AM, MadClown (fuyul...@gmail.com) wrote:

你好, 
    我有个需求是转换html中指定的字符串,  但是当response 较大时, 会被切成几个块传输,  这样就把我想要阶段的一个字符串切成了2次返回, 比如  www.google.com 切成了 www.goo  和gle.com, 请问有什么办法可以做到100%在lua阶段替换字符串吗?

--
--
邮件来自列表“openresty”,专用于技术讨论!
订阅: 请发空白邮件到 openresty...@googlegroups.com
发言: 请发邮件到 open...@googlegroups.com
退订: 请发邮件至 openresty+...@googlegroups.com
归档: http://groups.google.com/group/openresty
官网: http://openresty.org/
仓库: https://github.com/agentzh/ngx_openresty
教程: http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html
---
您收到此邮件是因为您订阅了Google网上论坛上的“openresty”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到openresty+...@googlegroups.com
要在网络上查看此讨论,请访问https://groups.google.com/d/msgid/openresty/5ae379df-c86b-43af-ab4b-cd7f963400cdo%40googlegroups.com

MadClown

unread,
Jan 12, 2021, 9:47:08 PM1/12/21
to openresty
嗯好的, 我翻了一下, 好像有办法做到, 谢谢
Reply all
Reply to author
Forward
0 new messages