httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rasmus Lerdorf <ras...@lerdorf.com>
Subject Re: Porting Apache from 1.3 to 2.0
Date Sat, 26 Apr 2003 09:11:53 GMT
The API along with the underlying architecture is radically different.
Don't expect to be able to port your Apache 1.3 module simply by replacing
a few function calls here and there.  You need to rewrite your module
completely.

Please read http://httpd.apache.org/docs-2.0/developer/API.html

-Rasmus

On Fri, 25 Apr 2003, Guntupalli, Santhi wrote:

> Hello,
> 	We were using Apache 1.3.3 in our application since long time. Now
> we are upgrading  Apache 1.3 to Apache 2.0. We have made some Apache
> functions calls from our application.
> 	Since Apache 2.0 many function names have changed/removed from
> Apache 1.3. For some functions I did not find substitutions. These are the
> problems I am facing during porting of my source code using Apache 1.3 to
> Apache 2.0
>  Following are the calls I am using from my source code.
>
> 1. ap_send_http_header - This is not implemented in Apache 2.0
> 	Since In my source code I am calling this function, How I can
> replace this call??
>
> 2.  ap_soft_timeout, ap_kill_timeout are removed from Apache 2.0.
> 	Whether I have to simply remove this calls from my source or any
> substitution?
>
> 	This is my sample code....
>
> 	request_rec r;
> 	r->content_type = "text/plain";
>       	 ap_soft_timeout("send call trace", r);
>
>
> 3.  In "request_rec"  structure  "char *boundary" has been removed  - how to
> substitute this structure variable.
>
> 	This is my sample code....
>
> 	r->content_type = ContType.c_str();
> 	r->boundary = (char*)getBoundary().c_str();
>
> 4. handler_rec has been removed, I think it is replaced by hooks, how to
> implement this
>
> 	This is my sample code
> static const handler_rec test_handlers[] =
> {
>     {"t-handler", tes_handler},
>     {NULL}
> };
>
> extern "C" {
> module MODULE_VAR_EXPORT   tes_handler=
> {
>     STANDARD_MODULE_STUFF,
>     NULL,			/* initializer */
>     NULL,			/* create per-directory config structure */
>     NULL,			/* merge per-directory config structures */
>     NULL,			/* create per-server config structure */
>     NULL,			/* merge per-server config structures */
>     NULL,			/* command table */
>     test_handlers,/* handlers */
>     NULL,			/* translate_handler */
>     NULL,			/* check_user_id */
>     NULL,			/* check auth */
>     NULL,			/* check access */
>     NULL,			/* type_checker */
>     NULL,			/* pre-run fixups */
>     NULL,			/* logger */
>     NULL,			/* header parser */
>     NULL,			/* child_init */
>     NULL,			/* child_exit */
>     NULL			/* post read-request */
> };
> }
> I think MODULE_VAR_EXPORT  changed to AP_MODULE_DECLARE_DATA and
> STANDARD_MODULE_STUFF STANDARD20_MODULE_STUFF.
>
> But I did not understand properly how to implement hooks in place of
> record_rec.
>
>
>
> Because of above problems, I am stuck here, not able to go further, I am
> grateful if anybody has solution for this.
>
> Any help is highly appreciated.
>
> Thanks in advance.
>
> - GS
>

Mime
View raw message