You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Gregg Smith <gl...@gknw.net> on 2015/11/04 00:40:37 UTC

Re: svn commit: r1712300 [1/2] - /httpd/httpd/trunk/modules/http2/

On 11/3/2015 6:33 AM, icing@apache.org wrote:
> Author: icing
> Date: Tue Nov  3 14:33:11 2015
> New Revision: 1712300
>
> URL: http://svn.apache.org/viewvc?rev=1712300&view=rev
> Log:
> rework of output handling on stream/session close, rework of cleartext (http:) output to pass buckets to core filters, splitting of stream/io memory pools for stability and less sync
>
> Added:
>      httpd/httpd/trunk/modules/http2/h2_bucket_eoc.c
>      httpd/httpd/trunk/modules/http2/h2_bucket_eoc.h
>      httpd/httpd/trunk/modules/http2/h2_bucket_eos.c
>      httpd/httpd/trunk/modules/http2/h2_bucket_eos.h
> Modified:
...
>      httpd/httpd/trunk/modules/http2/h2_util.c
>
> Added: httpd/httpd/trunk/modules/http2/h2_bucket_eoc.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_bucket_eoc.c?rev=1712300&view=auto
> ==============================================================================
...
> +
> +AP_DECLARE(apr_bucket *) h2_bucket_eoc_make(apr_bucket *b,
> +                                            h2_session *session)

No :) we cannot export with AP_DELARE in modules on Windows because we 
need to keep them separate from the AP_DECLARE functions we are going to 
be importing from core.

.\h2_util.c(727) : error C2491: 'h2_transfer_brigade' : definition of 
dllimport function not allowed
.\h2_bucket_eos.c(60) : error C2491: 'h2_bucket_eos_make' : definition 
of dllimport function not allowed
.\h2_bucket_eos.c(74) : error C2491: 'h2_bucket_eos_create' : definition 
of dllimport function not allowed
.\h2_bucket_eos.c(101) : error C2491: 'ap_bucket_type_h2_eos' : 
definition of dllimport data not allowed
.\h2_bucket_eoc.c(60) : error C2491: 'h2_bucket_eoc_make' : definition 
of dllimport function not allowed
.\h2_bucket_eoc.c(74) : error C2491: 'h2_bucket_eoc_create' : definition 
of dllimport function not allowed
.\h2_bucket_eoc.c(101) : error C2491: 'ap_bucket_type_h2_eoc' : 
definition of dllimport data not allowed

If we take a page from other modules (mod_dav/proxy/ssl) we can see the 
need to come up with an private set of declares.
I have the attached patch ready to commit.
...
> +AP_DECLARE_DATA const apr_bucket_type_t ap_bucket_type_h2_eoc = {
> +    "H2EOC", 5, APR_BUCKET_METADATA,
> +    bucket_destroy,
> +    bucket_read,
> +    apr_bucket_setaside_noop,
> +    apr_bucket_split_notimpl,
> +    apr_bucket_shared_copy
> +};
> +

 >>> Nit <<<
Should we really be declaring anything for export with an ap_* in a 
loadable module? I thought the ap_* name was reserved for core only, I 
may be wrong.



Re: svn commit: r1712300 [1/2] - /httpd/httpd/trunk/modules/http2/

Posted by Stefan Eissing <st...@greenbytes.de>.
Fixed in r1712514. Sorry for the attention this needed.

> Am 04.11.2015 um 07:51 schrieb Stefan Eissing <st...@greenbytes.de>:
> 
> That was not my intention. There should be no ap_* name in mod_http2 (or any other module). Will fix. Thanks for the catch. 
> 
>> Am 04.11.2015 um 00:40 schrieb Gregg Smith <gl...@gknw.net>:
>> 
>>> On 11/3/2015 6:33 AM, icing@apache.org wrote:
>>> Author: icing
>>> Date: Tue Nov  3 14:33:11 2015
>>> New Revision: 1712300
>>> 
>>> URL: http://svn.apache.org/viewvc?rev=1712300&view=rev
>>> Log:
>>> rework of output handling on stream/session close, rework of cleartext (http:) output to pass buckets to core filters, splitting of stream/io memory pools for stability and less sync
>>> 
>>> Added:
>>>    httpd/httpd/trunk/modules/http2/h2_bucket_eoc.c
>>>    httpd/httpd/trunk/modules/http2/h2_bucket_eoc.h
>>>    httpd/httpd/trunk/modules/http2/h2_bucket_eos.c
>>>    httpd/httpd/trunk/modules/http2/h2_bucket_eos.h
>>> Modified:
>> ...
>>>    httpd/httpd/trunk/modules/http2/h2_util.c
>>> 
>>> Added: httpd/httpd/trunk/modules/http2/h2_bucket_eoc.c
>>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_bucket_eoc.c?rev=1712300&view=auto
>>> ==============================================================================
>> ...
>>> +
>>> +AP_DECLARE(apr_bucket *) h2_bucket_eoc_make(apr_bucket *b,
>>> +                                            h2_session *session)
>> 
>> No :) we cannot export with AP_DELARE in modules on Windows because we need to keep them separate from the AP_DECLARE functions we are going to be importing from core.
>> 
>> .\h2_util.c(727) : error C2491: 'h2_transfer_brigade' : definition of dllimport function not allowed
>> .\h2_bucket_eos.c(60) : error C2491: 'h2_bucket_eos_make' : definition of dllimport function not allowed
>> .\h2_bucket_eos.c(74) : error C2491: 'h2_bucket_eos_create' : definition of dllimport function not allowed
>> .\h2_bucket_eos.c(101) : error C2491: 'ap_bucket_type_h2_eos' : definition of dllimport data not allowed
>> .\h2_bucket_eoc.c(60) : error C2491: 'h2_bucket_eoc_make' : definition of dllimport function not allowed
>> .\h2_bucket_eoc.c(74) : error C2491: 'h2_bucket_eoc_create' : definition of dllimport function not allowed
>> .\h2_bucket_eoc.c(101) : error C2491: 'ap_bucket_type_h2_eoc' : definition of dllimport data not allowed
>> 
>> If we take a page from other modules (mod_dav/proxy/ssl) we can see the need to come up with an private set of declares.
>> I have the attached patch ready to commit.
>> ...
>>> +AP_DECLARE_DATA const apr_bucket_type_t ap_bucket_type_h2_eoc = {
>>> +    "H2EOC", 5, APR_BUCKET_METADATA,
>>> +    bucket_destroy,
>>> +    bucket_read,
>>> +    apr_bucket_setaside_noop,
>>> +    apr_bucket_split_notimpl,
>>> +    apr_bucket_shared_copy
>>> +};
>>> +
>> 
>>>>> Nit <<<
>> Should we really be declaring anything for export with an ap_* in a loadable module? I thought the ap_* name was reserved for core only, I may be wrong.
>> 
>> 
>> <h2_declare.diff>


Re: svn commit: r1712300 [1/2] - /httpd/httpd/trunk/modules/http2/

Posted by Stefan Eissing <st...@greenbytes.de>.
That was not my intention. There should be no ap_* name in mod_http2 (or any other module). Will fix. Thanks for the catch. 

> Am 04.11.2015 um 00:40 schrieb Gregg Smith <gl...@gknw.net>:
> 
>> On 11/3/2015 6:33 AM, icing@apache.org wrote:
>> Author: icing
>> Date: Tue Nov  3 14:33:11 2015
>> New Revision: 1712300
>> 
>> URL: http://svn.apache.org/viewvc?rev=1712300&view=rev
>> Log:
>> rework of output handling on stream/session close, rework of cleartext (http:) output to pass buckets to core filters, splitting of stream/io memory pools for stability and less sync
>> 
>> Added:
>>     httpd/httpd/trunk/modules/http2/h2_bucket_eoc.c
>>     httpd/httpd/trunk/modules/http2/h2_bucket_eoc.h
>>     httpd/httpd/trunk/modules/http2/h2_bucket_eos.c
>>     httpd/httpd/trunk/modules/http2/h2_bucket_eos.h
>> Modified:
> ...
>>     httpd/httpd/trunk/modules/http2/h2_util.c
>> 
>> Added: httpd/httpd/trunk/modules/http2/h2_bucket_eoc.c
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_bucket_eoc.c?rev=1712300&view=auto
>> ==============================================================================
> ...
>> +
>> +AP_DECLARE(apr_bucket *) h2_bucket_eoc_make(apr_bucket *b,
>> +                                            h2_session *session)
> 
> No :) we cannot export with AP_DELARE in modules on Windows because we need to keep them separate from the AP_DECLARE functions we are going to be importing from core.
> 
> .\h2_util.c(727) : error C2491: 'h2_transfer_brigade' : definition of dllimport function not allowed
> .\h2_bucket_eos.c(60) : error C2491: 'h2_bucket_eos_make' : definition of dllimport function not allowed
> .\h2_bucket_eos.c(74) : error C2491: 'h2_bucket_eos_create' : definition of dllimport function not allowed
> .\h2_bucket_eos.c(101) : error C2491: 'ap_bucket_type_h2_eos' : definition of dllimport data not allowed
> .\h2_bucket_eoc.c(60) : error C2491: 'h2_bucket_eoc_make' : definition of dllimport function not allowed
> .\h2_bucket_eoc.c(74) : error C2491: 'h2_bucket_eoc_create' : definition of dllimport function not allowed
> .\h2_bucket_eoc.c(101) : error C2491: 'ap_bucket_type_h2_eoc' : definition of dllimport data not allowed
> 
> If we take a page from other modules (mod_dav/proxy/ssl) we can see the need to come up with an private set of declares.
> I have the attached patch ready to commit.
> ...
>> +AP_DECLARE_DATA const apr_bucket_type_t ap_bucket_type_h2_eoc = {
>> +    "H2EOC", 5, APR_BUCKET_METADATA,
>> +    bucket_destroy,
>> +    bucket_read,
>> +    apr_bucket_setaside_noop,
>> +    apr_bucket_split_notimpl,
>> +    apr_bucket_shared_copy
>> +};
>> +
> 
> >>> Nit <<<
> Should we really be declaring anything for export with an ap_* in a loadable module? I thought the ap_* name was reserved for core only, I may be wrong.
> 
> 
> <h2_declare.diff>

Re: svn commit: r1712300 [1/2] - /httpd/httpd/trunk/modules/http2/

Posted by William A Rowe Jr <wr...@rowe-clan.net>.
On Tue, Nov 3, 2015 at 5:40 PM, Gregg Smith <gl...@gknw.net> wrote:

> On 11/3/2015 6:33 AM, icing@apache.org wrote:
>
>> Author: icing
>> Date: Tue Nov  3 14:33:11 2015
>> New Revision: 1712300
>>
>> URL: http://svn.apache.org/viewvc?rev=1712300&view=rev
>> Log:
>> rework of output handling on stream/session close, rework of cleartext
>> (http:) output to pass buckets to core filters, splitting of stream/io
>> memory pools for stability and less sync
>>
>> Added:
>>      httpd/httpd/trunk/modules/http2/h2_bucket_eoc.c
>>      httpd/httpd/trunk/modules/http2/h2_bucket_eoc.h
>>      httpd/httpd/trunk/modules/http2/h2_bucket_eos.c
>>      httpd/httpd/trunk/modules/http2/h2_bucket_eos.h
>> Modified:
>>
> ...
>
>>      httpd/httpd/trunk/modules/http2/h2_util.c
>>
>> Added: httpd/httpd/trunk/modules/http2/h2_bucket_eoc.c
>> URL:
>> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_bucket_eoc.c?rev=1712300&view=auto
>>
>> ==============================================================================
>>
> ...
>
>> +
>> +AP_DECLARE(apr_bucket *) h2_bucket_eoc_make(apr_bucket *b,
>> +                                            h2_session *session)
>>
>
> No :) we cannot export with AP_DELARE in modules on Windows because we
> need to keep them separate from the AP_DECLARE functions we are going to be
> importing from core.
>
> .\h2_util.c(727) : error C2491: 'h2_transfer_brigade' : definition of
> dllimport function not allowed
> .\h2_bucket_eos.c(60) : error C2491: 'h2_bucket_eos_make' : definition of
> dllimport function not allowed
> .\h2_bucket_eos.c(74) : error C2491: 'h2_bucket_eos_create' : definition
> of dllimport function not allowed
> .\h2_bucket_eos.c(101) : error C2491: 'ap_bucket_type_h2_eos' : definition
> of dllimport data not allowed
> .\h2_bucket_eoc.c(60) : error C2491: 'h2_bucket_eoc_make' : definition of
> dllimport function not allowed
> .\h2_bucket_eoc.c(74) : error C2491: 'h2_bucket_eoc_create' : definition
> of dllimport function not allowed
> .\h2_bucket_eoc.c(101) : error C2491: 'ap_bucket_type_h2_eoc' : definition
> of dllimport data not allowed
>
> If we take a page from other modules (mod_dav/proxy/ssl) we can see the
> need to come up with an private set of declares.
> I have the attached patch ready to commit.
>
>>
Precisely, but understand that anytime you introduce a module export (al la
mod_dav.so) you create a hard load-order dependency on httpd, something we
attempted to eliminate in httpd 2.0 and forwards.  This is why the use of
optional functions, hook registration and so forth is preferred.


> +AP_DECLARE_DATA const apr_bucket_type_t ap_bucket_type_h2_eoc = {
>> +    "H2EOC", 5, APR_BUCKET_METADATA,
>> +    bucket_destroy,
>> +    bucket_read,
>> +    apr_bucket_setaside_noop,
>> +    apr_bucket_split_notimpl,
>> +    apr_bucket_shared_copy
>> +};
>> +
>>
>
> >>> Nit <<<
> Should we really be declaring anything for export with an ap_* in a
> loadable module? I thought the ap_* name was reserved for core only, I may
> be wrong.
>

No issue, the httpd project defines the ap_* namespace.

Bill