mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
*) copy regex captures $1, $2, etc.
*) SV flags debug logging
This commit is contained in:
parent
16623e0b9c
commit
e600494185
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user