<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Lua on Yullin Blog 运维 生活</title>
    <link>//yull.in/tags/lua.html</link>
    <description>Recent content in Lua on Yullin Blog 运维 生活</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-cn</language>
    <lastBuildDate>Mon, 11 Mar 2019 00:00:00 +0000</lastBuildDate><atom:link href="//yull.in/tags/lua/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Nginx Lua中的小陷阱</title>
      <link>//yull.in/2019/03/nginx-lua-traps.html</link>
      <pubDate>Mon, 11 Mar 2019 00:00:00 +0000</pubDate>
      
      <guid>//yull.in/2019/03/nginx-lua-traps.html</guid>
      <description>在日常的lua脚本调试中，我们通常会用ngx.say或者ngx.print来打印信息，但是要注意了，当你在ngx.redirect前面使用这两个方法时，就会报错哦
lua entry thread aborted: runtime error: attempt to call ngx.redirect after sending out the headers 但是用ngx.log方法一般是没有问题的
另外这里再记录一下，lua中的split实现方法，下面这个方法够简洁
string.split = function(s, p) local rt= {} string.gsub(s, &amp;#39;[^&amp;#39;..p..&amp;#39;]+&amp;#39;, function(w) table.insert(rt, w) end ) return rt end 使用示例：</description>
    </item>
    
  </channel>
</rss>
