| 154 | } |
| 155 | |
| 156 | static apr_bucket *make_valid_resp(conn_rec *c2, int status, |
| 157 | apr_table_t *headers, apr_table_t *notes) |
| 158 | { |
| 159 | apr_table_t *nheaders, *nnotes; |
| 160 | |
| 161 | ap_assert(headers); |
| 162 | nheaders = apr_table_clone(c2->pool, headers); |
| 163 | apr_table_unset(nheaders, "Connection"); |
| 164 | apr_table_unset(nheaders, "Upgrade"); |
| 165 | apr_table_unset(nheaders, "Sec-WebSocket-Accept"); |
| 166 | nnotes = notes? apr_table_clone(c2->pool, notes) : |
| 167 | apr_table_make(c2->pool, 10); |
| 168 | #if AP_HAS_RESPONSE_BUCKETS |
| 169 | return ap_bucket_response_create(status, NULL, nheaders, nnotes, |
| 170 | c2->pool, c2->bucket_alloc); |
| 171 | #else |
| 172 | return h2_bucket_headers_create(c2->bucket_alloc, |
| 173 | h2_headers_create(status, nheaders, |
| 174 | nnotes, 0, c2->pool)); |
| 175 | #endif |
| 176 | } |
| 177 | |
| 178 | static apr_bucket *make_invalid_resp(conn_rec *c2, int status, |
| 179 | apr_table_t *notes) |
no test coverage detected