Logging embedded Perl return value

davidc nginx-forum at nginx.us
Tue Jul 7 13:59:31 MSD 2009


Hi Igor,

Thanks for the patch! I just realized it's now in the stable 0.7.x release.

As a test, I tried adding a '207 response code by modifying the files below
and return 'HTTP_CUSTOM_RESPONSE' from the perl handler.

It didn't work so perhaps you could point me to where I'm going wrong?

diff -r orig/nginx-0.7.61/src/http/modules/perl/nginx.pm nginx-0.7.61/src/http/modules/perl/nginx.pm
18a19
>     HTTP_CUSTOM_RESPONSE
63a65
> use constant HTTP_CUSTOM_RESPONSE           => 207;


diff -r orig/nginx-0.7.61/src/http/ngx_http_header_filter_module.c nginx-0.7.61/src/http/ngx_http_header_filter_module.c
60a61
>     ngx_string("207 Custom Response"),
64c65
< #define NGX_HTTP_LAST_LEVEL_200  207
---
> #define NGX_HTTP_LAST_LEVEL_200  208


diff -r orig/nginx-0.7.61/src/http/ngx_http_request.h nginx-0.7.61/src/http/ngx_http_request.h
68a69
> #define NGX_HTTP_CUSTOM_RESPONSE           207

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,933,3808#msg-3808






More information about the nginx mailing list