| 1223 | |
| 1224 | #if AP_HAS_RESPONSE_BUCKETS |
| 1225 | apr_status_t h2_stream_submit_pushes(h2_stream *stream, ap_bucket_response *response) |
| 1226 | #else |
| 1227 | apr_status_t h2_stream_submit_pushes(h2_stream *stream, h2_headers *response) |
| 1228 | #endif |
| 1229 | { |
| 1230 | apr_status_t status = APR_SUCCESS; |
| 1231 | apr_array_header_t *pushes; |
| 1232 | int i; |
| 1233 | |
| 1234 | H2_STRM_ASSERT_MAGIC(stream, H2_STRM_MAGIC_OK); |
| 1235 | pushes = h2_push_collect_update(stream, stream->request, response); |
| 1236 | if (pushes && !apr_is_empty_array(pushes)) { |
| 1237 | ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c1, |
| 1238 | H2_STRM_MSG(stream, "found %d push candidates"), |
| 1239 | pushes->nelts); |
| 1240 | for (i = 0; i < pushes->nelts; ++i) { |
| 1241 | h2_push *push = APR_ARRAY_IDX(pushes, i, h2_push*); |
| 1242 | h2_stream *s = h2_session_push(stream->session, stream, push); |
| 1243 | if (!s) { |
| 1244 | status = APR_ECONNRESET; |
| 1245 | break; |
| 1246 | } |
| 1247 | } |
| 1248 | } |
| 1249 | return status; |
| 1250 | } |
| 1251 | |
| 1252 | apr_table_t *h2_stream_get_trailers(h2_stream *stream) |
| 1253 | { |
no test coverage detected