httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Eissing <stefan.eiss...@greenbytes.de>
Subject Re: Upgrade Summary
Date Thu, 10 Dec 2015 14:06:13 GMT

> Am 10.12.2015 um 14:57 schrieb Mike Rumph <mike.rumph@oracle.com>:
> 
> 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"?

If the protocol to switch to is not mine, DECLINE.

Should have written that in prose...

>> 			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;
>> 	}
>> 
>> 
> 


Mime
View raw message