Hey agentzh,<br><br>Very nice module. Good job and thanks!<br><br><br><div class="gmail_quote">On Tue, Nov 17, 2009 at 6:00 PM, agentzh <span dir="ltr">&lt;<a href="mailto:agentzh@gmail.com">agentzh@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi, folks!<br>
<br>
After two days&#39; work, I&#39;ve now got the &quot;headers_more&quot; module passing<br>
the its own test suite. This is an enhanced version of the standard<br>
&quot;headers&quot; module because it provides more utilities like resetting or<br>
clearing output headers. Builtin headers, like &quot;Content-Type&quot;,<br>
&quot;Content-Length&quot;, and &quot;Server&quot;,  are also manipulatable ;)<br>
<br>
It also allows you to specify an optional HTTP status code criteria<br>
using the -s option and an optional content type criteria using the -t<br>
option.<br>
<br>
Here&#39;s some random use cases:<br>
<br>
    more_set_headers &#39;Server: my-server&#39;;<br>
<br>
    location /foo {<br>
        more_set_headers &#39;X-MyHeader: blah&#39; &#39;X-MyHeader2: foo&#39;;<br>
        more_set_headers -t &#39;text/plain text/css&#39; &#39;Content-Type: text/foo&#39;;<br>
        more_set_headers -s &#39;400 404 500 503&#39; &#39;Foo: Bar&#39;;<br>
        more_clear_headers &#39;Transfer-Encoding&#39; &#39;Content-Type&#39;;<br>
    }<br>
<br>
    location /type {<br>
        more_set_headers &#39;Content-Type: text/plain&#39;;<br>
    }<br>
<br>
One important TODO is to allow variables within the new headers&#39;<br>
values. That&#39;s where &quot;headers_more&quot; is &quot;less&quot; than the standard<br>
&quot;headers&quot; module :P<br>
<br>
The Git source repository is here:<br>
<br>
    <a href="http://github.com/agentzh/headers-more-nginx-module" target="_blank">http://github.com/agentzh/headers-more-nginx-module</a><br>
<br>
And you&#39;re recommended to use the tarballs for the tagged releases:<br>
<br>
    <a href="http://github.com/agentzh/headers-more-nginx-module/downloads" target="_blank">http://github.com/agentzh/headers-more-nginx-module/downloads</a><br>
<br>
Don&#39;t hesitate to report any issues that you find ;)<br>
<br>
Enjoy!<br>
<font color="#888888">-agentzh<br>
<br>
</font></blockquote></div><br clear="all"><br>-- <br>Joshua Zhu<br><a href="http://www.zhuzhaoyuan.com">http://www.zhuzhaoyuan.com</a><br>