diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2007-12-09 20:52:14 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2007-12-09 20:52:14 +0000 |
| commit | e60049418525a5e605765aa2b8f9c6796eb390a6 (patch) | |
| tree | 41a0cae4855de72f656ea2fe703638553e6cc149 /src | |
| parent | 16623e0b9cd1b8138225615efeccf2093a7ced24 (diff) | |
| download | nginx-e60049418525a5e605765aa2b8f9c6796eb390a6.tar.gz nginx-e60049418525a5e605765aa2b8f9c6796eb390a6.tar.bz2 | |
*) copy regex captures $1, $2, etc.
*) SV flags debug logging
Diffstat (limited to 'src')
| -rw-r--r-- | src/http/modules/perl/nginx.xs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs index 65ec69c16..45b03ef3c 100644 --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -42,8 +42,12 @@ ngx_http_perl_sv2str(pTHX_ ngx_http_request_t *r, ngx_str_t *s, SV *sv) 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_http_perl_sv2str(pTHX_ ngx_http_request_t *r, ngx_str_t *s, SV *sv) 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 @@ print(r, ...) sv = SvRV(sv); } - if (SvREADONLY(sv)) { + if (SvREADONLY(sv) && SvPOK(sv)) { p = (u_char *) SvPV(sv, len); |
