MCPcopy Create free account
hub / github.com/apache/httpd / make_valid_resp

Function make_valid_resp

modules/http2/h2_ws.c:156–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156static 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
178static apr_bucket *make_invalid_resp(conn_rec *c2, int status,
179 apr_table_t *notes)

Callers 1

ws_handle_respFunction · 0.85

Calls 2

h2_bucket_headers_createFunction · 0.85
h2_headers_createFunction · 0.85

Tested by

no test coverage detected