Re: AW: 2.2 mod_http_proxy and partial pages
Roy T. Fielding wrote: No, you understood its purpose correctly. I have no idea what Justin is talking about -- maybe the proxy's connection to the outbound server? c-aborted is only set on the inbound connection when a previous write to that connection has failed. Setting the inbound c-aborted within a filter just to indicate that the outbound connection has died is wrong -- it prevents other parts of the server (that are working fine) from correctly handling the bad gateway response. I don't fully understand - the problem in question (as I understand it) happens when the backend drops the connection unexpectedly half way through the response. At this point the frontend connection has already sent a 200 Ok, it's already sent headers like Content-Length, etc, at this point there is no graceful way of handling the error or sending bad gateway. The only sane thing to do at this point (as I can see, unless I am missing something) is to abort the frontend connection, mirroring the same behaviour that the backend just did to us. At the same time, modules like Cache needs to be informed things have gone pear shaped, so the cached entry is invalidated. Or am I missing something? Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature
AW: AW: PR 37145
ok i have to apologize again. there are so many mails and i just cant read them all. could you please tell me (i am shure you have done this before .-) if this patch 37145 resolves that prob. we are using 2.0.55 and seem to have exactly this problem. jet it happend just a few times. we use mod_proxy only for script loadbalancing. not static sites. thx -Ursprüngliche Nachricht- Von: Ruediger Pluem [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 7. Dezember 2005 23:15 An: dev@httpd.apache.org Betreff: Re: AW: PR 37145 On 12/07/2005 09:48 PM, Matthias Behrens wrote: does this problem effect 2.0.55 too? AFAIK it does only affect 2.0.55 of the stable releases. It is a regression from 2.0.54 caused by the very much needed changes to mod_proxy to fix CVE-2005-2088. Regards Rüdiger
Re: AW: AW: PR 37145
Matthias, he just said yes, the patch attached to PR 37145 is already been added and solves the problem, but needs to be backported for 2.0.56, which a few of us already vote +1 (yes) that it's a good solution. Apply the patch and you should no longer see these problems. They are most marked when running SSL. Bill Matthias Behrens wrote: ok i have to apologize again. there are so many mails and i just cant read them all. could you please tell me (i am shure you have done this before .-) if this patch 37145 resolves that prob. we are using 2.0.55 and seem to have exactly this problem. jet it happend just a few times. we use mod_proxy only for script loadbalancing. not static sites. thx -Ursprüngliche Nachricht- Von: Ruediger Pluem [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 7. Dezember 2005 23:15 An: dev@httpd.apache.org Betreff: Re: AW: PR 37145 On 12/07/2005 09:48 PM, Matthias Behrens wrote: does this problem effect 2.0.55 too? AFAIK it does only affect 2.0.55 of the stable releases. It is a regression from 2.0.54 caused by the very much needed changes to mod_proxy to fix CVE-2005-2088. Regards Rüdiger
Re: Directions for Win32 binary httpd
Why don't you plan to use ant for the building process instead of namke/make. The major avantage of using ant would be to get a coherent, unique process for all majors platforms like WXP, Linux, Unix, OS/400, OS/390 FA - Original Message - From: William A. Rowe, Jr. [EMAIL PROTECTED] To: dev@httpd.apache.org Sent: Saturday, December 03, 2005 7:31 PM Subject: Re: Directions for Win32 binary httpd Steffen wrote: From a build standpoint I agree. But VC++ 2005 has improvements in Performance, MemoryManagement etc. The optimizer seems to improve the performance quite significantly. Contrary to what Microsoft would like, you can built the server with the needed DLLs statically so there is nothing to ship and nothing to install. The Sambar Server( www.sambar.com ) uses this approach. Steffan, you aren't considering the structure of httpd(!) Loading three dozen modules and several libraries, each with embedded Clib functions is quite sub-optimal ;-) For a monolithic program, I agree with your assessment. Of course, feel free to build under VC 2005 (freely for the next year!). We are talking about maximum flexibility for distribution purposes, only. Bill
RE: What do you want in HTTPD 2.4/3.0/X/GREEN?
hi we are using apache 2.0.55 win32 for loadbalancing with mod_proxy / mod_rewrite i understand there is a much easier way now with 2.2 which provides loadbalancing depending on throughput or requestcount thats a pretty good feature but something that would really kick ass would be if the proxy would know the cpu-load of every balanceserver is it possible you could hand the cpuload throu an extra header and restore it to zere if timeout secounds without requests that would be awsome. we now use an extra software to scedule between servers a first step that would be very cool also would be if i could cofigure a server to be used for n% of all requests and change this % while runtime. so if a server is running wild cause of a script that is using 100% cpu for endless (which happens pretty often here) i could lower his loadbalancing % to 1% so he would not get to much requests. thx matthias behrens www.gulp.de greetings from germany
Re: Directions for Win32 binary httpd
Francis ANDRE wrote: Why don't you plan to use ant for the building process instead of namke/make. The major avantage of using ant would be to get a coherent, unique process for all majors platforms like WXP, Linux, Unix, OS/400, OS/390 Excellent suggestion! Why don't you propose a patch to the APR project to build APR (a required component) using ant as an alternative to make? Bill
AW: AW: PR 37145
i am sorry for the (how often was i sorry again)th time i scrambled this prob with the partial pages prob. thx matthias -Ursprüngliche Nachricht- Von: Matthias Behrens [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 8. Dezember 2005 11:09 An: dev@httpd.apache.org Betreff: AW: AW: PR 37145 ok i have to apologize again. there are so many mails and i just cant read them all. could you please tell me (i am shure you have done this before .-) if this patch 37145 resolves that prob. we are using 2.0.55 and seem to have exactly this problem. jet it happend just a few times. we use mod_proxy only for script loadbalancing. not static sites. thx -Ursprüngliche Nachricht- Von: Ruediger Pluem [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 7. Dezember 2005 23:15 An: dev@httpd.apache.org Betreff: Re: AW: PR 37145 On 12/07/2005 09:48 PM, Matthias Behrens wrote: does this problem effect 2.0.55 too? AFAIK it does only affect 2.0.55 of the stable releases. It is a regression from 2.0.54 caused by the very much needed changes to mod_proxy to fix CVE-2005-2088. Regards Rüdiger
Re: Directions for Win32 binary httpd
Francis ANDRE wrote: Why don't you plan to use ant for the building process instead of namke/make. The major avantage of using ant would be to get a coherent, unique process for all majors platforms like WXP, Linux, Unix, OS/400, OS/390 There is still a significant amount of work involved in determining what features/libraries/headers are available on a specific platform, a problem ant doesn't solve for us. Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature
[jira] Resolved: (MODPYTHON-96) Accessing req.boundary causes crash.
[ http://issues.apache.org/jira/browse/MODPYTHON-96?page=all ] Nicolas Lehuen resolved MODPYTHON-96: - Fix Version: 3.2 Resolution: Fixed Accessing req.boundary causes crash. Key: MODPYTHON-96 URL: http://issues.apache.org/jira/browse/MODPYTHON-96 Project: mod_python Type: Bug Components: core Versions: 3.1.3, 3.2, 3.1.4 Reporter: Graham Dumpleton Fix For: 3.2 The code of requestobject.c contains: {boundary, (getter)getreq_recmbr, NULL, Multipart/byteranges boundary, boundary}, in the request_getsets[] array, but there is no definition of 'boundary' in the request_rec_mbrs[] array. As a consequence, when you access it, it will crash. The 'boundary' line therefore needs to be deleted from the source as it appears to serve no purpose. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
mod_auth_oracle
hi does mod_auth_oracle has anything to do with this mailinglist? i solved several thread issues in it and i wonder if anyone of you would be interested in my changes? matthias
Re: Directions for Win32 binary httpd
I do not address APR, but httpd. So even if APR seems to need make (while I am not really convince that ant cannot makes the job)., ant could be use for the httpd build process. Francis - Original Message - From: William A. Rowe, Jr. [EMAIL PROTECTED] To: dev@httpd.apache.org Sent: Thursday, December 08, 2005 11:59 AM Subject: Re: Directions for Win32 binary httpd Francis ANDRE wrote: Why don't you plan to use ant for the building process instead of namke/make. The major avantage of using ant would be to get a coherent, unique process for all majors platforms like WXP, Linux, Unix, OS/400, OS/390 Excellent suggestion! Why don't you propose a patch to the APR project to build APR (a required component) using ant as an alternative to make? Bill
Re: PR 37145
Ruediger Pluem wrote: Just a short reminder. I just got the 3rd duplicate for PR37145 ( data loss with httpd-2.0.55 reverse proxy method=post) and I remember myself that there had been additional cases that had been reported on the list. Well, I've posted about PR37402 which is also to revert mod_proxy behaviour broken by the changes in 2.0.55 - in this case POST *sub-requests*. It's a different situation to your bug. PatchAvailable... but I've had no feedback so I can't say what people think about it - only that it's working fine on our production servers (which do a total of around 4 million page impressions a day). The patch is currently missing one vote for backport to 2.0.x. I know that 2.0.56 may be far off, but I just hit the drums because I want to ensure that it gets in. I remember that OtherBill tended to be positive about the patch and Joe agreed with the analysis + it is already part of 2.2.0 - The best Apache HTTP Server available. So to the ballot please :-). Sorry to thread hijack, but I would really appreciate it if someone could either take some action on the above (and PR11540 come to that, which is pretty trivial) - or to give me some advice on how to get people interested. A good first step would be getting the patches into the trunk I guess. Should I come into IRC and get a sponsor? Or more testers before it's considered perhaps? Just continue to plug away on here? Are there particular people who do mod_proxy development that I might approach? Many thanks -- Stuart Children http://terminus.co.uk/
Re: mod_auth_oracle
On Thursday 08 December 2005 12:30, Matthias Behrens wrote: hi does mod_auth_oracle has anything to do with this mailinglist? No, it's a third-party module. OTOH posting here is not such a bad thing: its author may subscribe, and it enables me to point you towards ... i solved several thread issues in it and i wonder if anyone of you would be interested in my changes? ... from which I infer you have some Oracle expertise:-) If you had the time and inclination for it, we would welcome your input on the apr_dbd_oracle driver, at http://svn.apache.org/viewcvs.cgi/apr/apr-util/trunk/dbd/apr_dbd_oracle.c This is part of the Apache DBD framework, which should supersede earlier modules relying on SQL backends of any kind. -- Nick Kew
Re: 2.2 mod_http_proxy and partial pages
Plüm wrote: Stupid question: Can't we enforce at least this by setting c-keepalive to AP_CONN_CLOSE. Of course this does not solve the problem to make the remaining parts of the code aware of the bad gateway situation. Probably, but other modules already check c-aborted. So it would be best to be consistent. -- Brian Akins Lead Systems Engineer CNN Internet Technologies
Re: AW: 2.2 mod_http_proxy and partial pages
Graham Leggett wrote: At this point the frontend connection has already sent a 200 Ok, it's already sent headers like Content-Length, etc, at this point there is no graceful way of handling the error or sending bad gateway. I agree. There is no way we can inform the client of the problem. Currently, - we just cease sending the client data. - The client is rather confused - other modules think the request completed successfully. If we c-aborted: - we just cease sending the client data. - we close connection to client - The client is rather confused - other modules know that the request was aborted and can react So, currently, we would have to change multiple modules to notice some other error notification. Meanwhile, the client gains nothing. So, I say, just use c-aborted Another option, possibly even more evil, is to have another field in request_rec (or somewhere easy) that notes that the server (us or the backend) is causing the termination and not the client. Or make r-aborted have multiple values like c-keepalive: #define AP_NOT_ABORTED 0 #define AP_CLIENT_ABORTED 1 #define AP_ORIGIN_ABORTED 2 #define AP_INTERNAL_ABORTED 3 most modules could still just check for r-aborted. You could call that legacy support. New modules, if they desired, could react differently depending on actual value. Thoughts? -- Brian Akins Lead Systems Engineer CNN Internet Technologies
Re: AW: 2.2 mod_http_proxy and partial pages
Brian Akins wrote: r-aborted have multiple values like c-keepalive: of course, I meant c-aborted. -- Brian Akins Lead Systems Engineer CNN Internet Technologies
Re: [STATUS] (httpd-2.1) Wed Dec 7 23:52:11 2005
* Rodent of Unusual Size [EMAIL PROTECTED] [2005-12-07 23:52:11]: APACHE 2.3 STATUS: -*-text-*- Last modified at [$Date: 2005-11-13 02:22:18 -0500 (Sun, 13 Nov 2005) $] I think it is time to change the mail's subject regarding of its contents, ie. s/httpd-2\.1/httpd-2.3/ :) My 2 ¢ - Sam -- Maxime Petazzoni (http://www.bulix.org) -- gone crazy, back soon. leave message. signature.asc Description: Digital signature
Re: Directions for Win32 binary httpd
Francis ANDRE wrote: I do not address APR, but httpd. So even if APR seems to need make (while I am not really convince that ant cannot makes the job)., ant could be use for the httpd build process. The biggest body of work that needs to be done during the build is handled in the ./configure script. The ./configure script (built by autoconf) is designed already to handle the different types of make out there. Changing from make to ant would involve teaching autoconf to create ./configure to make ant scripts instead of Makefiles, and that's just doing the same thing just using a different program, it buys nothing. If however you extended ant so that it could do the job of autoconf/configure, then you would be onto something. But only on platforms that supported Java, of course. Regards, Graham -- smime.p7s Description: S/MIME Cryptographic Signature
Re: Apache 2.0.54(Worker) installation on RHES not working(Zombie processes on startup)
[EMAIL PROTECTED] wrote: uname -a Linux ex07 2.4.21-37.EL #1 Wed Sep 7 13:35:21 EDT 2005 i686 i686 i386 GNU/Linux Is that RH3? I have had no issues with worker and rh3 What does error log say? And what is threadsperchild set to? It may be a stack size thing. -- Brian Akins Lead Systems Engineer CNN Internet Technologies
Re: AW: 2.2 mod_http_proxy and partial pages
On Wed, Dec 07, 2005 at 06:16:42PM -0800, Roy Fielding wrote: Setting the inbound c-aborted within a filter just to indicate that the outbound connection has died is wrong -- it prevents other parts of the server (that are working fine) from correctly handling the bad gateway response. FWIW, it's not a filter - it's the handler itself that is setting c-aborted. If you have another idea how to specify via the handler that the connection needs to be dropped, I'm all ears. But, I couldn't see one. -- justin
Re: mod_auth_oracle
On Thursday 08 December 2005 13:13, Nick Kew wrote: This is part of the Apache DBD framework, which should supersede earlier modules relying on SQL backends of any kind. To which I should have added a pointer to the relevant manpages for using it for authentication. http://httpd.apache.org/docs/2.2/mod/mod_authn_dbd.html and possibly also http://httpd.apache.org/docs/trunk/mod/mod_authz_dbd.html -- Nick Kew
Re: AW: 2.2 mod_http_proxy and partial pages
On Dec 8, 2005, at 8:31 AM, Brian Akins wrote: Graham Leggett wrote: At this point the frontend connection has already sent a 200 Ok, it's already sent headers like Content-Length, etc, at this point there is no graceful way of handling the error or sending bad gateway. I agree. There is no way we can inform the client of the problem. Currently, - we just cease sending the client data. - The client is rather confused - other modules think the request completed successfully. If we c-aborted: - we just cease sending the client data. - we close connection to client - The client is rather confused - other modules know that the request was aborted and can react So, currently, we would have to change multiple modules to notice some other error notification. Meanwhile, the client gains nothing. So, I say, just use c-aborted +1
Re: Apache 2.0.54(Worker) installation on RHES not working(Zombie processes on startup)
Quoting [EMAIL PROTECTED]: I am using Apache 2.0.54 on RHEL3u5 with no problems. It's working as a reverse-proxy with mod_disk_cache. I did have problems with RHEL3u5's Apache2 package, though. Caching did not work (and yes, DSOs were loaded), so I had to install from sources. I can't remember now, but I think RHEL3u5 comes with Apache 2.0.46 + security patches up to 2.0.53. That's the version I was having problems with. Hi, I am trying to install Apache 2.0.54 on RedHat enterprise edition, though the Installation is a succes, starting of Apache results in lots of zombie processes with no active process. Machine Information: uname -a Linux ex07 2.4.21-37.EL #1 Wed Sep 7 13:35:21 EDT 2005 i686 i686 i386 GNU/Linux more /etc/issue Red Hat Enterprise Linux AS release 3 (Taro Update 6) gcc -v gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-20) Installation steps: a) ./configure \ --prefix=/home/shiva/apache2 \ --with-mpm=worker \ --enable-modules=most \ --enable-mods-shared=all b) make c) make install Install is a success. on starting the server using apachectl I was able to compile and execute the same with success of sun solaris Is there some [EMAIL PROTECTED] logs]$ ../bin/apachectl start [EMAIL PROTECTED] logs]$ ps -aef | grep httpd shiva 8016 1 0 11:01 ?00:00:00 /home/shiva/apache2/bin/httpd -k start shiva 8017 8016 0 11:01 ?00:00:00 /home/shiva/apache2/bin/httpd -k start shiva 8018 8016 0 11:01 ?00:00:00 /home/shiva/apache2/bin/httpd -k start shiva 8019 8018 0 11:01 ?00:00:00 /home/shiva/apache2/bin/httpd -k start shiva 8020 8016 0 11:01 ?00:00:00 /home/shiva/apache2/bin/httpd -k start shiva 8021 8020 0 11:01 ?00:00:00 /home/shiva/apache2/bin/httpd -k start shiva 8023 8021 0 11:01 ?00:00:00 /home/shiva/apache2/bin/httpd -k start I was able to compile and execute the same with success of sun solaris. But in case of RedHatES all the processes die. Is there some installation step/param which is incorrect or not mentioned? Any kind of clue would be of great help to me. Thanks in advance. shiva Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments.
Re: Directions for Win32 binary httpd
IMHO, ant should not be used to generate the configure and makefile scripts; Instead the building process must avoid all these specific Unix tools like autoconf/configure. As a example of a great usage of ant for building a product, have a look to the directory in the Apache axis project : ws-axis/c/build. It is the build directory for the Apache Axis C version targeting the major platforms as Linux, OS/400 HP-UX, OS/390 and so on. I am using a similar approach for a tool targeting WXP, Linux, OS/390 and it works as expected: only one build infrastructure for all platforms. Regards Francis - Original Message - From: Graham Leggett [EMAIL PROTECTED] To: dev@httpd.apache.org Sent: Thursday, December 08, 2005 3:28 PM Subject: Re: Directions for Win32 binary httpd Francis ANDRE wrote: I do not address APR, but httpd. So even if APR seems to need make (while I am not really convince that ant cannot makes the job)., ant could be use for the httpd build process. The biggest body of work that needs to be done during the build is handled in the ./configure script. The ./configure script (built by autoconf) is designed already to handle the different types of make out there. Changing from make to ant would involve teaching autoconf to create ./configure to make ant scripts instead of Makefiles, and that's just doing the same thing just using a different program, it buys nothing. If however you extended ant so that it could do the job of autoconf/configure, then you would be onto something. But only on platforms that supported Java, of course. Regards, Graham --
Re: Directions for Win32 binary httpd
Francis ANDRE wrote: IMHO, ant should not be used to generate the configure and makefile scripts; Instead the building process must avoid all these specific Unix tools like autoconf/configure. As a example of a great usage of ant for building a product, have a look to the directory in the Apache axis project : ws-axis/c/build. It is the build directory for the Apache Axis C version targeting the major platforms as Linux, OS/400 HP-UX, OS/390 and so on. I am using a similar approach for a tool targeting WXP, Linux, OS/390 and it works as expected: only one build infrastructure for all platforms. Sounds great. Send Patches. I personally also like SCons[1], which is in Python, and has a similar goal to Ant. -Paul [1] http://www.scons.org/
Re: Directions for Win32 binary httpd
On Thursday 08 December 2005 17:07, Francis ANDRE wrote: IMHO, ant should not be used to generate the configure and makefile scripts; Instead the building process must avoid all these specific Unix tools like autoconf/configure. As a example of a great usage of ant for building a product, have a look to the directory in the Apache axis project : ws-axis/c/build. I really don't like the idea of having to install ant just to build apache. It's a major new dependency, yet adds nothing to the server. Or am I missing something? -- Nick Kew
AW: mod_auth_oracle
i'd like to take a look at it. mod_authn_dbd does not seem to be part of 2.2.0 win32 where can i get the win32 sources? -Ursprüngliche Nachricht- Von: Nick Kew [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 8. Dezember 2005 16:09 An: dev@httpd.apache.org Betreff: Re: mod_auth_oracle On Thursday 08 December 2005 13:13, Nick Kew wrote: This is part of the Apache DBD framework, which should supersede earlier modules relying on SQL backends of any kind. To which I should have added a pointer to the relevant manpages for using it for authentication. http://httpd.apache.org/docs/2.2/mod/mod_authn_dbd.html and possibly also http://httpd.apache.org/docs/trunk/mod/mod_authz_dbd.html -- Nick Kew
AP_INIT_TAKE1 in 2.2 and C++
Dear All, I'm the author of Anyterm (http://anyterm.org), which includes an Apache module. Although I haven't yet tried to compile it for Apache 2.2 some of my users have, and they're having problems. See http://anyterm.org/forums/viewtopic.php?pid=768#p768. It looks as if the definition of AP_INIT_TAKE1 has changed at some point, and now looks like this: # define AP_INIT_TAKE1(directive, func, mconfig, where, help) \ { directive, { .take1=func }, mconfig, where, TAKE1, help } That {.take1=func} syntax was a new one on me. A quick test suggests that it is legal in C but not in C++, and I compile my module with g++. I can see that this definition is selected by a #if, with a regular definition without the whacky syntax also available. So, would it be OK to have this alternative more conventional declaration when __cplusplus is defined? Is there something I can do before #including the Apache headers to make it all work? Cheers, --Phil. p.s. Either I'm being dense, or there isn't a Doxygenated source tree linked anywhere from the httpd web pages. apr.apache.org links to one for apr only. Did there used to be, or am I imagining it?
Re: What do you want in HTTPD 2.4/3.0/X/GREEN?
On 12/08/2005 11:59 AM, Matthias Behrens wrote: [..cut..] thats a pretty good feature but something that would really kick ass would be if the proxy would know the cpu-load of every balanceserver is it possible you could hand the cpuload throu an extra header and restore it to zere if timeout secounds without requests This is possible. You can write your own modules that provide the load balancing meachanism as a provider. Thus you can provide a lb provider that somehow gets this information from the backend and uses it for its lb decisions. [..cut..] a first step that would be very cool also would be if i could cofigure a server to be used for n% of all requests and change this % while runtime. so if a server is running wild cause of a script that is using 100% cpu for endless (which happens pretty often here) i could lower his loadbalancing % to 1% so he would not get to much requests. You can already do this. See http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html#enable Regards Rüdiger
Re: Directions for Win32 binary httpd
On 12/08/2005 06:57 PM, Nick Kew wrote: On Thursday 08 December 2005 17:07, Francis ANDRE wrote: [..cut..] I really don't like the idea of having to install ant just to build apache. It's a major new dependency, yet adds nothing to the server. Also my opinion. Ant is a great tool for many things, but not for this as much of the work that needs to be done during the build process is detecting platform specific things. We already have a working build system that is based on standard tools and I see no real gain in changing the build system again. Furthermore you need a platform with a recent JDK. Of course our main platforms should provide this, but I think many of the platforms on the outer rim do not have this. Converting the build system to Ant would cancel support for those platforms. Regards Rüdiger
Re: Directions for Win32 binary httpd
On 12/8/05, Ruediger Pluem [EMAIL PROTECTED] wrote: Furthermore you need a platform with a recent JDK. Of course our main platforms should provide this, but I think many of the platforms on the outer rim do not have this. Converting the build system to Ant would cancel support for those platforms. It's not just the outer rim, most BSD systems don't have Java installed, and I'd hardly consider them fringe platforms. -garrett
[jira] Created: (MODPYTHON-97) mod_python.publisher iterables and content_type broken
mod_python.publisher iterables and content_type broken -- Key: MODPYTHON-97 URL: http://issues.apache.org/jira/browse/MODPYTHON-97 Project: mod_python Type: Bug Components: publisher Versions: 3.2 Reporter: Graham Dumpleton In 3.2, mod_python.publisher was modified so that if it encountered an interable it would recursively iterate over the items and publish each with the result being concatenated. FWIW, I personally didn't like this as I saw it potentially changing the behaviour of existing code, although perhaps in contrived cases or for test code only. I saw that this sort of behaviour should have been managed by the user by explicit use of a wrapper class instead, rather than it being magic. End of ramble. :-) Regardless of my concerns, the behaviour that was added is broken. Specifically, mod_python.publisher is setting the content type based on the content of the first item returned from the iterable. For example, consider the following: index = [ 'htmlbodyp', 1000 * X, '/p/body/html', ] When published, this is resulting in the content type being set to 'text/plain' and not 'text/html'. In part this is perhaps caused by the fact that the content type check is now performed by looking for a trailing '/html' in the content whereas previously it would look for a leading 'html'. This was changed because all the HTML prologue that can appear before 'html' would often throw out this check with the HTML not being automatically being detected. Thus at the time it was thought that looking for the trailing '/html' would be more reliable. It ain't going to help to go back to using a leading 'html' check though as the first item may only contain the prologue and not 'html'. These checks are only going to work for iterables if the results of publishing of each item were added to the end of a list of strings, rather than being written back immediately using req.write(). Once all that has been returned by the iterable is obtained, this can all be joined back together and then the HTML check done. Joining all the separate items returned from the iterable back together defeats the purpose of what this feature was about in the first place and may result in huge in memory objects needing to be created to hold the combined result just so the HTML check can be done. The only way to avoid the problem is for the content type to be set explicitly by the user before the iterable is processed. This is a bit tricky as it is mod_python.publisher which is automagically doing this. The best you can do is something like: class SetContentType: def __init__(self,content_type): self.__content_type = content_type def __call__(self,req): req.content_type = self.__content_type return index = [ SetContentType('text/html'), 'htmlbodyp', 1000 * X, '/p/body/html', ] Once you start doing this, the user may as well have provided their own published function in the first place that set the content type and manually iterated over items and wrote them to req.write(). This could also be managed by a user specified wrapper class which is how I saw this as preferably being done in the first place. Ie., class PublishIterable: def __init__(self,value,content_type): self.__value = value self.__content_type = content_type def __call__(self,req): req.content_type = self.__content_type for item in self.__value: req.write(item) _values = [ 'htmlbodyp', 1000 * X, '/p/body/html', ] index = PublishIterable(_values,'text/html') Personally I believe this automagic publishing of iterables should be removed from mod_python.publisher. You might still provide a special function/wrapper that works like PublisherIterable but handles recursive structures and callable objects in the process, but I feel it should be up to the user to make a conscious effort to use it and mod_python.publisher shouldn't assume that it should process any iterable in this way automatically. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: Directions for Win32 binary httpd
On 12/08/2005 11:20 PM, Garrett Rooney wrote: On 12/8/05, Ruediger Pluem [EMAIL PROTECTED] wrote: [..cut..] It's not just the outer rim, most BSD systems don't have Java installed, and I'd hardly consider them fringe platforms. Sorry for this. I never intended to put BSD systems to the outer rim. I guess I work too much with java and thus with the platforms that have it installed normally :-). But this makes my argument against using Ant even stronger. Regards Rüdiger
Re: AP_INIT_TAKE1 in 2.2 and C++
Phil Endecott wrote: # define AP_INIT_TAKE1(directive, func, mconfig, where, help) \ { directive, { .take1=func }, mconfig, where, TAKE1, help } That {.take1=func} syntax was a new one on me. A quick test suggests that it is legal in C but not in C++, and I compile my module with g++. I've had problems with that very same block of code. Also, in 2.0.55 it won't compile in C on a Sempron box. I have no idea why using a Sempron would make a difference, but it's the only box I have where it fails. My work-a-round is to delete the whacky code from the source and recompile. Everything works fine after that. FWIW, I've never seen that syntax before either.
Re: AP_INIT_TAKE1 in 2.2 and C++
On 12/8/05, Brandon Fosdick [EMAIL PROTECTED] wrote: FWIW, I've never seen that syntax before either. That's C99 syntax. Older compilers, and C++ compilers, don't generally support it. -garrett
Re: AP_INIT_TAKE1 in 2.2 and C++
On Thursday 08 December 2005 21:12, Phil Endecott wrote: [AP_INIT incompatible with C++ in 2.2] Joe had a suggestion about that, but noone followed up on it. IMO it would be worth fixing if someone had a round tuit, but I don't see it as a priority job. http://mail-archives.apache.org/mod_mbox/httpd-dev/200510.mbox/20051010110213.GB1527%40redhat.com -- Nick Kew
Re: Directions for Win32 binary httpd
Nick Kew wrote: I really don't like the idea of having to install ant just to build apache. It's a major new dependency, yet adds nothing to the server. We have too many dependencies, at least this -one- would be ASF software. I wholeheartedly support the concept, but don't believe this is actually a viable option at this point. Moreover, Francis' comments reflect a lack of comprehension with respect to the chore of determining platform specific details that (at the moment) require us to use autoconf, or some similar detection/test compilation feature. Ant is not prepared to handle these issues, and autoconf's results aren't well integrated to serve ant. His further dismissal of beginning at APR leads me to suspect that he's never actually built httpd, or in the process, never noted that APR is the first, most fundemental dependency. If APR is not built using ant, all further discussion on this list is rather pointless, no? Bill
Re: AW: 2.2 mod_http_proxy and partial pages
On Dec 8, 2005, at 6:58 AM, Justin Erenkrantz wrote: On Wed, Dec 07, 2005 at 06:16:42PM -0800, Roy Fielding wrote: Setting the inbound c-aborted within a filter just to indicate that the outbound connection has died is wrong -- it prevents other parts of the server (that are working fine) from correctly handling the bad gateway response. FWIW, it's not a filter - it's the handler itself that is setting c-aborted. The handler is just the top of the filter stack. The point is that it doesn't know anything about the other end (the c connection) and thus can't know if it should be aborted. waka, for example, has an abort mechanism on the wire and thus would be horribly abused by such a workaround. If you have another idea how to specify via the handler that the connection needs to be dropped, I'm all ears. But, I couldn't see one. -- justin I would extend the EOS bucket data to be an errno and then have mod_cache check for that data != 0 when it does its EOS check. I am surprised it wasn't implemented that way in the first place. Roy
Re: AW: 2.2 mod_http_proxy and partial pages
On Thu, Dec 08, 2005 at 08:38:53PM -0800, Roy Fielding wrote: On Dec 8, 2005, at 6:58 AM, Justin Erenkrantz wrote: On Wed, Dec 07, 2005 at 06:16:42PM -0800, Roy Fielding wrote: Setting the inbound c-aborted within a filter just to indicate that the outbound connection has died is wrong -- it prevents other parts of the server (that are working fine) from correctly handling the bad gateway response. FWIW, it's not a filter - it's the handler itself that is setting c-aborted. The handler is just the top of the filter stack. The point is that it doesn't know anything about the other end (the c connection) and thus can't know if it should be aborted. waka, for example, has an abort mechanism on the wire and thus would be horribly abused by such a workaround. Even with an EOS bucket, how will we indicate that the connection should be aborted? (i.e. don't try to do any further writes?) (See below as to why an EOS doesn't do anything.) If you have another idea how to specify via the handler that the connection needs to be dropped, I'm all ears. But, I couldn't see one. -- justin I would extend the EOS bucket data to be an errno and then have mod_cache check for that data != 0 when it does its EOS check. For httpd's filters, an EOS bucket data doesn't attempt a close of the stream: in fact, EOS doesn't do anything to the socket. By the time we start writing the body, all of the filters that know HTTP are long gone. (The only thing that might be left is a chunking output filter.) Plus, with apr's bucket types, there is no mechanism to associate that type of error condition. I am surprised it wasn't implemented that way in the first place. I am too, but I'd like to be able to resolve this veto without radically having to redesign filters in httpd. =) FWIW, serf doesn't have these sorts of problems; that's one of the (many) things we corrected with serf's filter design. -- justin
Re: AP_INIT_TAKE1 in 2.2 and C++
* Garrett Rooney [EMAIL PROTECTED] wrote: On 12/8/05, Brandon Fosdick [EMAIL PROTECTED] wrote: FWIW, I've never seen that syntax before either. That's C99 syntax. Older compilers, and C++ compilers, don't generally support it. Then we should throw it away. We are supposed to support C89/90. nd
Re: AW: 2.2 mod_http_proxy and partial pages
On Dec 8, 2005, at 9:21 PM, Justin Erenkrantz wrote: Even with an EOS bucket, how will we indicate that the connection should be aborted? (i.e. don't try to do any further writes?) The inbound connection hasn't been aborted -- only the outbound. We don't even want to abort the inbound connection until the client has received as much of the response as we received, since that will help the client diagnose the error. The only thing we need to do is invalidate the cache entry, which would be done when mod_*_cache checks the EOS bucket (which it already does) for an error (the new feature). I would extend the EOS bucket data to be an errno and then have mod_cache check for that data != 0 when it does its EOS check. For httpd's filters, an EOS bucket data doesn't attempt a close of the stream: in fact, EOS doesn't do anything to the socket. By the time we start writing the body, all of the filters that know HTTP are long gone. (The only thing that might be left is a chunking output filter.) Plus, with apr's bucket types, there is no mechanism to associate that type of error condition. No, but we can graft it onto the currently unused EOS bucket data. I am surprised it wasn't implemented that way in the first place. I am too, but I'd like to be able to resolve this veto without radically having to redesign filters in httpd. =) Me too -- I'll see what I can come up with during the hackathon. When I looked at it earlier, a fix seemed feasible with only two lines of code plus whatever log messages are desired. FWIW, serf doesn't have these sorts of problems; that's one of the (many) things we corrected with serf's filter design. -- justin Yes, but will it be done before waka? ;-) Roy