Return-Path: X-Original-To: apmail-perl-dev-archive@www.apache.org Delivered-To: apmail-perl-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D8E419FC8 for ; Tue, 8 May 2012 04:27:18 +0000 (UTC) Received: (qmail 28949 invoked by uid 500); 8 May 2012 04:27:17 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 28640 invoked by uid 500); 8 May 2012 04:27:10 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 28600 invoked by uid 99); 8 May 2012 04:27:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2012 04:27:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.161.177] (HELO mail-gg0-f177.google.com) (209.85.161.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2012 04:27:02 +0000 Received: by ggcs5 with SMTP id s5so672601ggc.22 for ; Mon, 07 May 2012 21:26:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-gm-message-state; bh=xUbzu4wKDYIjPhoyRmm6lRfVNpIkEm0DZGfrjrPcTog=; b=A3DVQBR8GGI5e+iK3BrwA7agK5dEVSSLcgArqdpa82Q+9eAs6j2DYAtCoV8AZW6azg Wb5RhhkREDGgTyFM4KVpj8yYb+a+ZaucNZyE/Kvv05xR6JNHIWPkJQHnJY2f4B4TQj8Q Fll4ruZ/HuXZ+2KHmtIIA2oXzKtw9qy1zHOTpuh9n3JoBhUPsj2dj4u138Uy2fHaWMv2 PaZaspqentTeuiLAYmqchpdsf8f2dKoY3K46EW25cxn8Mx2A1UYSJiYYPlFuxQsI9vLv rCVNZDwDWf0ux9Na4Kl721NgwpjoFZ4bJa7SkEKgXaujDP9BtG0oYqx4CqRfB7yRg8UA 6/ug== MIME-Version: 1.0 Received: by 10.50.46.228 with SMTP id y4mr7448096igm.10.1336451200888; Mon, 07 May 2012 21:26:40 -0700 (PDT) Received: by 10.42.140.6 with HTTP; Mon, 7 May 2012 21:26:40 -0700 (PDT) In-Reply-To: <4F852843.6090007@redhat.com> References: <4F852843.6090007@redhat.com> Date: Mon, 7 May 2012 21:26:40 -0700 Message-ID: Subject: Re: mod_perl and httpd-2.4 From: Fred Moyer To: =?UTF-8?Q?Jan_Kalu=C5=BEa?= Cc: dev@perl.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQmsSQMNayiUO92Dasblrka17HtZ7egPla0Ssrtzo41g4ai2wZOcr7XhcU/41MvAlsUCNDYy On Tue, Apr 10, 2012 at 11:44 PM, Jan Kalu=C5=BEa wrot= e: > I've talked with Torsten about the mod_perl and httpd-2.4 compatibility a= nd > he advised me to start discussion about this problem. > > Attached patch against httpd24 branch fixes the compilation with httpd-2.= 4. > I was not able to generate xs using "make source_scan", so I've changed t= hem > manually. Should source_scan.pl work...? What changes to source_scan.pl did you have to make? I've gotten httpd 2.4 to compile successfully, and I think this patch will work in terms of the api changes, but it needs to provide the appropriate method depending on the httpd minor version, remote_ip for 2.0, 2.2 and client_ip for 2.4. I'm not sure where that happens yet in the codebase - maybe FunctionTable.pm? I would favor the compatibility layer approach personally. I have some code on CPAN that uses remote_ip, so I don't really want to go change that to support 2.4 just yet. > > Except the source_scan.pl issue, there is one issue which has to be > addressed too. > > conn_rec->remote_ip and conn_rec->remote_addr have been removed and repla= ced > by request_rec->useragent_ip, request_rec->useragent_addr and > conn_rec->client_ip, conn_rec->client_addr. See [1] to read about the > differences between them. > > There are two ways how to address this issue: > > 1. Break the compatibility with older mod_perl versions. The advantage is > that mod_perl will stay consistent with httpd and mod_perl developers wou= ld > not have to maintain the compatibility layer. > > The disadvantage is that if there are projects using mod_perl and > remote_ip/remote_addr, they would have to be fixed too. However, it's the > very same situation like with httpd-2.4, where all the modules using > remote_ip/remote_addr have to be fixed too. > > 2. Introduce the compatibility layer. I'm not Perl expert, but I think wi= th > the way how mod_perl is built currently it's not doable out-of-box (I can= be > wrong of course). > > Interesting thing is also that most modules I've ported to httpd-2.4 use > remote_ip/remote_addr in the meaning of useragent_ip/useragent_addr. In > http-2.4 these two pairs are members of different structs (conn_rec and > request_rec). I think I can't imagine how would we map conn_rec->remote_i= p > to request_rec->useragent_ip... > > > Personally I would vote for the number 1 and bumping mod_perl version. > > I'm not Perl developer, I just co-maintain mod_perl in Fedora and in the > development version httpd has been updated to 2.4, so mod_perl is not > building there anymore. > > Regards, > Jan Kaluza > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org > For additional commands, e-mail: dev-help@perl.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org