Hello!
On Sat, Mar 23, 2013 at 9:54 AM, Chris Love wrote:
> I have thanked you, in the past, for your hard work on lua nginx. I want to
> repeat my appreciation of for that.
>
Thanks :)
> Specifically I need a base 64 string that has a date value in it that
> matches the current date. ie
>
> POST /foo
> Date:Sat, 23 Mar 2013 15:51:59 GMT
> Auth: some_dynamic_base64_value_that_has_above_date_in_it
>
You do not need to modify Test::Nginx for just this. You can just use
the "eval" filter (provided by Test::Base, which is inherited by
Test::Nginx) to inject some Perl code in it, as in
--- raw_request eval
<perl code that generates the expected response header on-the-fly>
Take a look at this real-world example in ngx_lua's test suite:
https://github.com/chaoslawful/lua-nginx-module/blob/master/t/104-req-raw-header.t#L159
BTW, I'm cc'ing the openresty-en mailing list:
https://groups.google.com/group/openresty-en And you're encouraged to
move such discussions regarding Test::Nginx or Nginx in general over
to that list. I dislike off-list discussions for no good reason :)
Thanks!
Best regards,
-agentzh