httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch>
Subject Re: [PATCH] trunk/2.4 core output filter is broken
Date Fri, 03 Feb 2012 19:13:48 GMT
On Thursday 02 February 2012, Joe Orton wrote:
> The combination of APR_SUCCESS and DECLINED is unusual; an int
> return  value with OK/DECLINED?

Input and output filters should return an apr_status_t. So, if the 
hook does not return an apr_status_t, core_input_filter() would have 
to invent some apr_status_t value, which is bad. And I think the 
general principle that return code 'int' means HTTP_* error code 
should be kept.

But I agree that DECLINED == -1 is not a good idea, because it could 
in theory collide with another APR_E* code. Should we define an 
AP_STATUS_DECLINED or something in the APR_OS_START_USERERR range?
Or simply change the definition of DECLINED to be in the 
APR_OS_START_USERERR range? APR_OS_START_USERERR is 120000, so there 
should be no danger of a collision with HTTP_*. It would require a 
major MMN bump, but making core_output_filter_ctx_t and core_ctx_t 
private is an API change, anyway.

View raw message