| 648 | } |
| 649 | |
| 650 | apr_status_t h2_stream_set_request_rec(h2_stream *stream, |
| 651 | request_rec *r, int eos) |
| 652 | { |
| 653 | h2_request *req; |
| 654 | apr_status_t status; |
| 655 | |
| 656 | H2_STRM_ASSERT_MAGIC(stream, H2_STRM_MAGIC_OK); |
| 657 | ap_assert(stream->request == NULL); |
| 658 | ap_assert(stream->rtmp == NULL); |
| 659 | if (stream->rst_error) { |
| 660 | return APR_ECONNRESET; |
| 661 | } |
| 662 | status = h2_request_rcreate(&req, stream->pool, r, |
| 663 | &stream->session->hd_scratch); |
| 664 | if (status == APR_SUCCESS) { |
| 665 | ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, |
| 666 | H2_STRM_LOG(APLOGNO(03058), stream, |
| 667 | "set_request_rec %s host=%s://%s%s"), |
| 668 | req->method, req->scheme, req->authority, req->path); |
| 669 | stream->rtmp = req; |
| 670 | /* simulate the frames that led to this */ |
| 671 | return h2_stream_recv_frame(stream, NGHTTP2_HEADERS, |
| 672 | NGHTTP2_FLAG_END_STREAM, 0); |
| 673 | } |
| 674 | return status; |
| 675 | } |
| 676 | |
| 677 | void h2_stream_set_request(h2_stream *stream, const h2_request *r) |
| 678 | { |
no test coverage detected