*) copy regex captures $1, $2, etc.

*) SV flags debug logging
This commit is contained in:
Igor Sysoev 2007-12-09 20:52:14 +00:00
parent 16623e0b9c
commit e600494185

View File

@ -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);