OCSP stapling: added http response status logging.

This commit is contained in:
Maxim Dounin 2016-12-05 22:23:22 +03:00
parent d80352c759
commit 0a1290b739

View File

@ -1310,12 +1310,11 @@ ngx_ssl_ocsp_process_status_line(ngx_ssl_ocsp_ctx_t *ctx)
rc = ngx_ssl_ocsp_parse_status_line(ctx); rc = ngx_ssl_ocsp_parse_status_line(ctx);
if (rc == NGX_OK) { if (rc == NGX_OK) {
#if 0 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, ctx->log, 0,
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ctx->log, 0, "ssl ocsp status %ui \"%*s\"",
"ssl ocsp status line \"%*s\"", ctx->code,
ctx->response->pos - ctx->response->start, ctx->header_end - ctx->header_start,
ctx->response->start); ctx->header_start);
#endif
ctx->process = ngx_ssl_ocsp_process_headers; ctx->process = ngx_ssl_ocsp_process_headers;
return ctx->process(ctx); return ctx->process(ctx);
@ -1476,6 +1475,7 @@ ngx_ssl_ocsp_parse_status_line(ngx_ssl_ocsp_ctx_t *ctx)
if (++ctx->count == 3) { if (++ctx->count == 3) {
state = sw_space_after_status; state = sw_space_after_status;
ctx->header_start = p - 2;
} }
break; break;
@ -1493,6 +1493,7 @@ ngx_ssl_ocsp_parse_status_line(ngx_ssl_ocsp_ctx_t *ctx)
state = sw_almost_done; state = sw_almost_done;
break; break;
case LF: case LF:
ctx->header_end = p;
goto done; goto done;
default: default:
return NGX_ERROR; return NGX_ERROR;
@ -1506,6 +1507,7 @@ ngx_ssl_ocsp_parse_status_line(ngx_ssl_ocsp_ctx_t *ctx)
state = sw_almost_done; state = sw_almost_done;
break; break;
case LF: case LF:
ctx->header_end = p;
goto done; goto done;
} }
break; break;
@ -1514,6 +1516,7 @@ ngx_ssl_ocsp_parse_status_line(ngx_ssl_ocsp_ctx_t *ctx)
case sw_almost_done: case sw_almost_done:
switch (ch) { switch (ch) {
case LF: case LF:
ctx->header_end = p - 1;
goto done; goto done;
default: default:
return NGX_ERROR; return NGX_ERROR;