Mercurial > hg > nginx
changeset 1703:43747661804d
*) copy regex captures $1, $2, etc.
*) SV flags debug logging
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 09 Dec 2007 20:52:14 +0000 |
parents | 86bb52e28ce0 |
children | e584e946e198 |
files | src/http/modules/perl/nginx.xs |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/perl/nginx.xs Sun Dec 09 19:30:30 2007 +0000 +++ b/src/http/modules/perl/nginx.xs Sun Dec 09 20:52:14 2007 +0000 @@ -42,8 +42,12 @@ s->len = len; - if (SvREADONLY(sv)) { + if (SvREADONLY(sv) && SvPOK(sv)) { s->data = p; + + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "perl sv2str: %08XD \"%V\"", sv->sv_flags, s); + return NGX_OK; } @@ -54,6 +58,9 @@ ngx_memcpy(s->data, p, len); + ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, + "perl sv2str: %08XD \"%V\"", sv->sv_flags, s); + return NGX_OK; } @@ -532,7 +539,7 @@ sv = SvRV(sv); } - if (SvREADONLY(sv)) { + if (SvREADONLY(sv) && SvPOK(sv)) { p = (u_char *) SvPV(sv, len);