Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 84173 invoked by uid 500); 26 Apr 2003 09:11:29 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 84158 invoked from network); 26 Apr 2003 09:11:29 -0000 Date: Sat, 26 Apr 2003 02:11:53 -0700 (Pacific Standard Time) From: Rasmus Lerdorf To: "'dev@httpd.apache.org'" Subject: Re: Porting Apache from 1.3 to 2.0 In-Reply-To: <177E503C4DA3D311BC9D0008C791C3060E8FCD15@diexch01.xko.dec.com> Message-ID: References: <177E503C4DA3D311BC9D0008C791C3060E8FCD15@diexch01.xko.dec.com> X-X-Sender: rasmus@lerdorf.com MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 >