53 int has_final_response;
64 const char ws_guid[] =
"258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
91 "h2_c2(%s-%d): websocket request with method %s",
97 "h2_c2(%s-%d): websocket CONNECT without :scheme",
103 "h2_c2(%s-%d): websocket CONNECT without :path",
109 "h2_c2(%s-%d): websocket CONNECT for %s",
114 wsreq->method =
"GET";
122 "error generating secret");
168#if AP_HAS_RESPONSE_BUCKETS
187#if AP_HAS_RESPONSE_BUCKETS
200#if AP_HAS_RESPONSE_BUCKETS
209 if (
ws_ctx->has_final_response) {
215 "h2_c2(%s-%d): H2_C2_WS_OUT inspecting response %d",
223 "h2_c2(%s-%d): websocket CONNECT, valid 101 Upgrade"
224 ", converting to 200 response",
233 "h2_c2(%s-%d): websocket CONNECT, got 101 response "
234 "without Sec-WebSocket-Accept header",
241 "h2_c2(%s-%d): websocket CONNECT, 101 response "
242 "with 'Sec-WebSocket-Accept: %s' but expected %s",
244 ws_ctx->ws_accept_base64);
250 else if (
resp->status < 200) {
253 else if (
resp->status < 300) {
256 "h2_c2(%s-%d): websocket CONNECT, invalid response %d",
263 ws_ctx->has_final_response = 1;
273 ws_ctx->override_body = 1;
276 ws_ctx->has_final_response = 1;
288 if (
ws_ctx->override_body) {
309#if AP_HAS_RESPONSE_BUCKETS
318 else if (
ws_ctx->override_body) {
Apache Multi-Processing Module library.
APR general purpose library routines.
#define APR_SHA1_DIGESTSIZE
APR-UTIL string matching routines.
apr_status_t ap_pass_brigade(ap_filter_t *filter, apr_bucket_brigade *bucket)
apr_status_t ap_remove_output_filter_byhandle(ap_filter_t *next, const char *handle)
ap_filter_rec_t * ap_register_output_filter(const char *name, ap_out_filter_func filter_func, ap_init_filter_func filter_init, ap_filter_type ftype)
ap_filter_t * ap_add_output_filter(const char *name, void *ctx, request_rec *r, conn_rec *c)
void ap_hook_post_read_request(ap_HOOK_post_read_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define APR_BUCKET_INSERT_AFTER(a, b)
#define APR_BUCKET_IS_METADATA(e)
#define APR_BUCKET_NEXT(e)
#define APR_BRIGADE_SENTINEL(b)
#define apr_bucket_delete(e)
#define APR_BRIGADE_FIRST(b)
#define APR_BUCKET_INSERT_BEFORE(a, b)
#define HTTP_SWITCHING_PROTOCOLS
#define HTTP_NOT_IMPLEMENTED
int ap_cstr_casecmp(const char *s1, const char *s2)
const char int apr_pool_t * pool
apr_vformatter_buff_t * c
#define apr_pcalloc(p, size)
int h2_config_sgeti(server_rec *s, h2_config_var_t var)
#define h2_conn_ctx_get(c)
h2_request * h2_request_clone(apr_pool_t *p, const h2_request *src)
const h2_request * h2_ws_rewrite_request(const h2_request *req, conn_rec *c2, int no_body)
void h2_ws_register_hooks(void)
Apache connection library.
This structure is used for recording information about the registered filters. It associates a name w...
The representation of a filter chain.
Structure to store things which are per connection.
struct ap_filter_t * output_filters
struct apr_bucket_alloc_t * bucket_alloc
A structure that represents the current request.