Question below:
On 12/10/2015 2:46 AM, Stefan Eissing wrote:
int xxx_switch(conn_rec *c, request_rec *r, server_rec *s,
const char *protocol, int phase)
{
apr_status_t stats;
if (strcmp(my_protocol, protocol)) {
Do you mean "if my_protocol is protocol"?
return DECLINED;
}
if (need_handler && phase != handler) {
return APR_EAGAIN;
}
status = ap_upgrade_request(r, protocol, phase,
my_additional_header, process_body);
if (status != APR_SUCCESS) {
// any type of error, could also fail if NULL is passed
instead of
// &process_body and request has body
return status;
}
// c->output_filters can be written
// c->input_filters can be read, will pass data to
process_body() until body is done,
// then return data up the filter chain.
process protocol;
return APR_EOF;
}