Re: Core dump scan breaks exit() status
On Wed, 29 Aug 2001, Stas Bekman wrote: On Wed, 29 Aug 2001, Stas Bekman wrote: The change was made in revision 1.28 of TestRun.pm, if you want to have a look at it yourself. I have no idea how to fix this in a nice way, short of moving it into a wrapper that runs t/TEST, remembers the exit status, then checks for coredumps afterwards and then exits accordingly. I guess you are talking about the END block: eval END { eval { Apache::TestRun-new(test_config = Apache::TestConfig-thaw)-scan; }; }; but what exit status was it returning before? I don't think we have any definition of the exit status definitions according to the tests success or failure. Or do we? At the moment (or at least before that END block was there) it returns 1 if something breaks. I see, try this patch (untested): I didn't realize that END {} is a block already :) here is a simpler patch (still untested): Index: Apache-Test/lib/Apache/TestRun.pm === RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v retrieving revision 1.41 diff -u -r1.41 TestRun.pm --- Apache-Test/lib/Apache/TestRun.pm 2001/08/27 05:55:17 1.41 +++ Apache-Test/lib/Apache/TestRun.pm 2001/08/29 15:49:48 @@ -221,6 +221,7 @@ #always run, a subclass might not want that eval END { + local $?; # preserve the exit status eval { Apache::TestRun-new(test_config = Apache::TestConfig-thaw)-scan; Stas, thanks, that worked a treat. May I request that you commit it? Gary [ Gary Benson, Red Hat Europe ][ [EMAIL PROTECTED] ][ GnuPG 60E8793A ]
Re: cvs commit: httpd-test/perl-framework/t/apache 404.t
On Wed, Aug 29, 2001 at 10:27:53PM -, [EMAIL PROTECTED] wrote: jsachs 01/08/29 15:27:53 Added: perl-framework/t/apache 404.t Log: quick 404 test. verifies that Content-Type is text/html. A tag too late. =) -- justin
Re: [PATCH] mod_autoindex HeaderName/ReadmeName content_type
This is a wee bit to hackish. Proper configuration of the files is more appropriate. On Apache 1.3, I believe the hack that works is AddType /README text/plain AddType /HEADER text/plain Please don't ask why this should work ... is just does ;) Give it a shot, let us know if it solves your problem without hassle. Bill - Original Message - From: Robert Simonson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 29, 2001 8:41 AM Subject: [PATCH] mod_autoindex HeaderName/ReadmeName content_type This patch is to set the content_type to the default if the subrequest request_rec content_type is NULL. Rob Simonson [EMAIL PROTECTED] == --- mod_autoindex.c.asfsave.c Wed Aug 29 08:29:17 2001 +++ mod_autoindex.c Wed Aug 29 08:32:15 2001 @@ -999,49 +999,49 @@ (rr-status == HTTP_OK) (rr-filename != NULL) rr-finfo.filetype == APR_REG) { +if (rr-content_type == NULL) +rr-content_type = ap_default_type(rr); /* * Check for the two specific cases we allow: text/html and * text/anything-else. The former is allowed to be processed for * SSIs. */ -if (rr-content_type != NULL) { -if (!strcasecmp(ap_field_noparam(r-pool, rr-content_type), - text/html)) { - /* Hope everything will work... */ - emit_amble = 0; - emit_H1 = 0; +if (!strcasecmp(ap_field_noparam(r-pool, rr-content_type), +text/html)) { +/* Hope everything will work... */ +emit_amble = 0; +emit_H1 = 0; - if (! suppress_amble) { - emit_preamble(r, title); - } - /* - * If there's a problem running the subrequest, display the - * preamble if we didn't do it before -- the header file - * didn't get displayed. - */ - if (ap_run_sub_req(rr) != OK) { - /* It didn't work */ - emit_amble = suppress_amble; - emit_H1 = 1; - } -} -else if (!strncasecmp(text/, rr-content_type, 5)) { - /* - * If we can open the file, prefix it with the preamble - * regardless; since we'll be sending a pre block around - * the file's contents, any HTML header it had won't end up - * where it belongs. - */ - if (apr_file_open(f, rr-filename, APR_READ, -APR_OS_DEFAULT, r-pool) == APR_SUCCESS) { - emit_preamble(r, title); - emit_amble = 0; - do_emit_plain(r, f); - apr_file_close(f); - emit_H1 = 0; - } -} -} +if (! suppress_amble) { +emit_preamble(r, title); +} +/* + * If there's a problem running the subrequest, display the + * preamble if we didn't do it before -- the header file + * didn't get displayed. + */ +if (ap_run_sub_req(rr) != OK) { +/* It didn't work */ +emit_amble = suppress_amble; +emit_H1 = 1; +} +} +else if (!strncasecmp(text/, rr-content_type, 5)) { +/* + * If we can open the file, prefix it with the preamble + * regardless; since we'll be sending a pre block around + * the file's contents, any HTML header it had won't end up + * where it belongs. + */ +if (apr_file_open(f, rr-filename, APR_READ, + APR_OS_DEFAULT, r-pool) == APR_SUCCESS) { +emit_preamble(r, title); +emit_amble = 0; +do_emit_plain(r, f); +apr_file_close(f); +emit_H1 = 0; +} +} } if (emit_amble) { @@ -1082,32 +1082,32 @@ (rr-status == HTTP_OK) (rr-filename != NULL) rr-finfo.filetype == APR_REG) { +if (rr-content_type == NULL) +rr-content_type = ap_default_type(rr); /* * Check for the two specific cases we allow: text/html and * text/anything-else. The former is allowed to be processed for * SSIs. - */ -if (rr-content_type != NULL) { -if (!strcasecmp(ap_field_noparam(r-pool, rr-content_type), - text/html)) { - if (ap_run_sub_req(rr) == OK) { - /* worked... */ - suppress_sig = 1; - suppress_post = suppress_amble; - } -} -else if (!strncasecmp(text/, rr-content_type, 5)) { - /* - * If we can open the file, suppress the signature. - */ - if (apr_file_open(f, rr-filename, APR_READ, -APR_OS_DEFAULT,
Re: [PATCH] mod_autoindex HeaderName/ReadmeName content_type
Yes, I understand that this would solve the problem. My thought is if there wasn't an AddType, shouldn't we be trying to use the default type? If the default type is good enough to use when serving the README directly, why not when serving it up for directory browsing? Rob Simonson [EMAIL PROTECTED] William A. Rowe, Jr. [EMAIL PROTECTED] on 08/29/2001 09:07:55 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: Re: [PATCH] mod_autoindex HeaderName/ReadmeName content_type This is a wee bit to hackish. Proper configuration of the files is more appropriate. On Apache 1.3, I believe the hack that works is AddType /README text/plain AddType /HEADER text/plain Please don't ask why this should work ... is just does ;) Give it a shot, let us know if it solves your problem without hassle. Bill - Original Message - From: Robert Simonson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 29, 2001 8:41 AM Subject: [PATCH] mod_autoindex HeaderName/ReadmeName content_type This patch is to set the content_type to the default if the subrequest request_rec content_type is NULL. Rob Simonson [EMAIL PROTECTED] == --- mod_autoindex.c.asfsave.c Wed Aug 29 08:29:17 2001 +++ mod_autoindex.c Wed Aug 29 08:32:15 2001 @@ -999,49 +999,49 @@ (rr-status == HTTP_OK) (rr-filename != NULL) rr-finfo.filetype == APR_REG) { +if (rr-content_type == NULL) +rr-content_type = ap_default_type(rr); /* * Check for the two specific cases we allow: text/html and * text/anything-else. The former is allowed to be processed for * SSIs. */ -if (rr-content_type != NULL) { -if (!strcasecmp(ap_field_noparam(r-pool, rr-content_type), - text/html)) { - /* Hope everything will work... */ - emit_amble = 0; - emit_H1 = 0; +if (!strcasecmp(ap_field_noparam(r-pool, rr-content_type), +text/html)) { +/* Hope everything will work... */ +emit_amble = 0; +emit_H1 = 0; - if (! suppress_amble) { - emit_preamble(r, title); - } - /* - * If there's a problem running the subrequest, display the - * preamble if we didn't do it before -- the header file - * didn't get displayed. - */ - if (ap_run_sub_req(rr) != OK) { - /* It didn't work */ - emit_amble = suppress_amble; - emit_H1 = 1; - } -} -else if (!strncasecmp(text/, rr-content_type, 5)) { - /* - * If we can open the file, prefix it with the preamble - * regardless; since we'll be sending a pre block around - * the file's contents, any HTML header it had won't end up - * where it belongs. - */ - if (apr_file_open(f, rr-filename, APR_READ, -APR_OS_DEFAULT, r-pool) == APR_SUCCESS) { - emit_preamble(r, title); - emit_amble = 0; - do_emit_plain(r, f); - apr_file_close(f); - emit_H1 = 0; - } -} -} +if (! suppress_amble) { +emit_preamble(r, title); +} +/* + * If there's a problem running the subrequest, display the + * preamble if we didn't do it before -- the header file + * didn't get displayed. + */ +if (ap_run_sub_req(rr) != OK) { +/* It didn't work */ +emit_amble = suppress_amble; +emit_H1 = 1; +} +} +else if (!strncasecmp(text/, rr-content_type, 5)) { +/* + * If we can open the file, prefix it with the preamble + * regardless; since we'll be sending a pre block around + * the file's contents, any HTML header it had won't end up + * where it belongs. + */ +if (apr_file_open(f, rr-filename, APR_READ, + APR_OS_DEFAULT, r-pool) == APR_SUCCESS) { +emit_preamble(r, title); +emit_amble = 0; +do_emit_plain(r, f); +apr_file_close(f); +emit_H1 = 0; +} +} } if (emit_amble) { @@ -1082,32 +1082,32 @@ (rr-status == HTTP_OK) (rr-filename != NULL) rr-finfo.filetype == APR_REG) { +if (rr-content_type == NULL) +rr-content_type = ap_default_type(rr); /* * Check for the two specific cases we allow: text/html and * text/anything-else. The former is allowed to be processed for * SSIs. - */ -if (rr-content_type != NULL) { -if
time for 2.0.25?
apache.org seems to have been running .24 (+mod_include fix) for a while now (3days). How about we TagRoll .25 put it up on apache.org and if all goes well monday will be beta2 day. -- Ian Holsman [EMAIL PROTECTED] Performance Measurement Analysis CNET Networks - (415) 364-8608
Re: cvs commit: apache-1.3/conf highperformance.conf-dist httpd.conf-disthttpd.conf-dist-nw httpd.conf-dist-win
On 29 Aug 2001 [EMAIL PROTECTED] wrote: martin 01/08/29 06:32:07 Modified:src CHANGES .Makefile.tmpl config.layout configure conf highperformance.conf-dist httpd.conf-dist httpd.conf-dist-nw httpd.conf-dist-win Log: Parallel to a change in Apache-2.0, the manual directory was moved out of the DocumentRoot tree to simplify the separation of private contentconfiguration from server's on-line documentation. An Alias /manual/ ... projects the manual/ directory (which resides now side-by-side with the icons/ directory) into the logical DocumentRoot. Note that a request to http://server/manual (without the trailing slash) will now behave different than before (it used to redirect to http://server/manual/ but no longer does). I'm not sure it makes sense to be backporting changes like this to 1.3, but in any case... Why are we not using the same alias as in 2.0, ie. Alias /manual ... instead lf Alias /manual/ ...? If you do it like it is done in 2.0, then you do not need the trailing /.
RE: mod_tls
The referrence here is one about all the filters used by apache 2.0. If there is a filter bucket in APR, it's understandable that Apache 2.0 modules will have 2 parts. The logic piece and the filter piece. As far as I can tell, the filter mechanism allows for some distinct advantages and makes for a very flexible configuration framework. My issue here is that if mod_tls is sacrificed, then what's the point of using filters at all anyway? That said, could it be said that you CAN write a module for Apache 2.0 without needing the use of filters? If so, then that makes sense. -- Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-796-9023 email: [EMAIL PROTECTED] -Original Message- From: MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 9:39 PM To: '[EMAIL PROTECTED]' Subject: RE: mod_tls 'not sure what you mean by entire filter scheme - if you're referring to the proposal to seperate the HTTPS and the SSL filter logic - I'd rather prefer to leave SSL as it is (especially if it works with other protocol modules).. Thanks -Madhu -Original Message- From: Gonyou, Austin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 1:08 PM To: '[EMAIL PROTECTED]' Subject: RE: mod_tls Kewl. Less maintenance all around. Is the entire filter scheme doomed like this though? -- Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-796-9023 email: [EMAIL PROTECTED] -Original Message- From: Ryan Bloom [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 1:58 AM To: [EMAIL PROTECTED]; Doug MacEachern Cc: MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) Subject: Re: mod_tls On Monday 27 August 2001 23:03, Doug MacEachern wrote: On Thu, 23 Aug 2001, Ryan Bloom wrote: Because mod_ssl only implements the SSL wrapping for HTTP. The idea is that the filters go in mod_tls, and mod_ssl just has the logic to make the filters work for HTTP. That way, SSL can work with POP3, NNTP, and the proxy. i think mod_ssl should work with all protocols (it works with nntp right now). mod_ssl provides features such as: CRLs session caching per-location renegotation SSLRequire logging var lookups and so on that are not http specific. there is a bit more effort to get a protocol module such as nntp working both with and without ssl. for example with nntp when the first client connects it does not send a request (like http clients do), but awaits a 200 - ready response. to work with ssl, an nntp protocol module needs to first call get_brigade to trigger the initial ssl negotiation. but the same issue is there with mod_tls. personally, i don't think its worth the effort to maintain both mod_tls and mod_ssl. effort would be better spent modularizing mod_ssl to support other protocols if needed. Cool, if this works, then we should just ditch mod_tls. Ryan __ Ryan Bloom [EMAIL PROTECTED] Covalent Technologies [EMAIL PROTECTED] --
Re: Comments on accept-mutex/single-listen patch ??
Jim Jagielski [EMAIL PROTECTED] writes: At 11:00 AM -0400 8/28/01, Jeff Trawick wrote: HAVE_NONE_xxx means that you can turn the accept mutex into a no-op, even in the multiple-listener case. If we can play around with this on one platform (e.g., Darwin), why can't we play around with this everywhere? Because, at least with the systems I've been testing, it appears to work OK on OS X, and, as such, we should allow others to have the choice. I've no idea if it works under IRIX, and having it as a compiled default implies that we've tested it as such... Basically, I want people to be able to use any of the compiled-in methods and have Apache work (maybe not the fastest, but at least we know it works). If we find out that NONE is supported and viable on other platforms, we'll change things to make it a compiled default, but it's premature to do it *now* without that knowledge. how would it not work? fubar kernel? -- Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...
Re: [PATCH] V2: Accept Mutex Runtime Option
Jim Jagielski [EMAIL PROTECTED] writes: Here's the 2nd, improved version of the make-accept-mutex-method-runtime patch. It includes changes suggested... Tested under Solaris and OS X. Please check out... I've played with this a little (after changing SYSVMEM and sysvmem to SYSVSEM and sysvsem) on Linux and AIX and haven't had any problems. I haven't paid any real attention to SingleListen. Hopefully it still defaults to very reasonable behavior :) After you commit it I'll probably turn on sysvsem support for AIX (by defining HAVE_SYSVSEM_SERIALIZED_ACCEPT and NEED_UNION_SEMUN). -- Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...
Re: time for 2.0.25?
+1 Ryan Bloom wrote: On Wednesday 29 August 2001 09:25, Ian Holsman wrote: I was panning to tag this afternoon. I just need five minutes to do it. Ryan apache.org seems to have been running .24 (+mod_include fix) for a while now (3days). How about we TagRoll .25 put it up on apache.org and if all goes well monday will be beta2 day. -- === Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/ A society that will trade a little liberty for a little order will lose both and deserve neither
RE: mod_tls
In 1.3.x, it was so happening that Apache/mod_ssl registers the connection id (fd) with OpenSSL, and then OpenSSL takes over the connection handling as well as the protocol communication stuff from that point onwards.. In 2.x, with the introduction of filters, OpenSSL nolonger talks directly to the client directly.. Instead, all the data comes/goes thru' the filters (*_NETWORK_*).. The connection handling stuff is done at the APR level.. Thus, the OpenSSL is used only for the protocol logic ONLY and not for handling any connection details.. Pl. let me know if you need more details.. Thanks -Madhu -Original Message- From: Sunitha Kumar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 9:39 AM To: [EMAIL PROTECTED] Subject: Re: mod_tls could some one give pointers on the need for filters around the ssl code. What would be lost if those filters don't exist. And, what was the need to put them in, originally. thanks, sunitha Gonyou, Austin wrote: The referrence here is one about all the filters used by apache 2.0. If there is a filter bucket in APR, it's understandable that Apache 2.0 modules will have 2 parts. The logic piece and the filter piece. As far as I can tell, the filter mechanism allows for some distinct advantages and makes for a very flexible configuration framework. My issue here is that if mod_tls is sacrificed, then what's the point of using filters at all anyway? That said, could it be said that you CAN write a module for Apache 2.0 without needing the use of filters? If so, then that makes sense.
Re: time for 2.0.25?
On Wed, Aug 29, 2001 at 11:30:53AM -0700, Ryan Bloom wrote: On Wednesday 29 August 2001 11:09, Jim Jagielski wrote: The tarballs are up now! Let's get to beta this time,PLEASE 2.0.25 compiles and runs on Solaris 8/x86. The 404/506 errors are now fixed, so I'm cool with this. +1 for beta. -- justin
PHP4 as CGI with 2.0.25
Hi there, I just updated to 2.0.25 on my Win32 system, where I have the following lines in the httpd.conf to use PHP 4 as CGI ScriptAlias /php/ e:/server/php/ AddType application/x-httpd-php .php Action application/x-httpd-php /php/php.exe Action application/x-httpd-php-source /php/php.exe This worked fine until now. Now I only get an The requested URL /php/php.exe/index.php was not found on this server. error when trying to access /index.php. Were there any changes that I might have missed? -- Sebastian Bergmann Measure Traffic Usability http://sebastian-bergmann.de/http://phpOpenTracker.de/
Re: Comments on accept-mutex/single-listen patch ??
On Wed, 29 Aug 2001, Jim Jagielski wrote: recall that the current code *defaults* to NONE (basically, if no other method is compiled in) and will allow that option to be used (but will post a warning unless MULTITHREAD is defined). So we're even *safer* than the current such that if none are compiled in, we don't start. The reason the current 1.3 non-MULTITHREAD code complains if it doesn't know what method works for serialized accepts is because they are _REQUIRED_ for things to work properly. Not having them is an indication that the port does not work correctly. Basically the patch creates a set method based on that, and *allows* it to be compiled in if desired. Nothing more. I'd like more people to test the OS X implementation out, because that's the only one so far that I've seen that appears to work with some limited stress testing. And if we remove that from the Darwin case, so be it. There is nothing to test. Using the 1.3 process based model, you need serialized accepts if you have multiple listening sockets. Period. Adding an option to disable that simply doesn't make any sense. appears to work is irrelevant when you are dealing with race conditions. We went through all the reasons why it is needed when it was added in the first place, it wasn't just added on a whim. What your patch does is make it appear legitimate to not use any accept mutex in the multiple listener case on some non-MULTITHREAD platforms on 1.3. That is not right.
Re: PHP4 as CGI with 2.0.25
From: Sebastian Bergmann [EMAIL PROTECTED] Sent: Wednesday, August 29, 2001 2:24 PM Hi there, I just updated to 2.0.25 on my Win32 system, where I have the following lines in the httpd.conf to use PHP 4 as CGI ScriptAlias /php/ e:/server/php/ AddType application/x-httpd-php .php Action application/x-httpd-php /php/php.exe Action application/x-httpd-php-source /php/php.exe This worked fine until now. Now I only get an The requested URL /php/php.exe/index.php was not found on this server. error when trying to access /index.php. Were there any changes that I might have missed? Yes, the directory negotiation and AddType handling. I need to walk back now and look at the action directive. Perhaps I interfered with it, or perhaps it's interfering with my patch. I hope to have an answer today. Also - note that names are -heavily- canonicalized now, so it's possible that something that just 'slipped through' in spite of one of the ap_os_canonicalize_filename flavors is now caught. Likewise, I've tried to catch every abuse of ap_make_full_path and toggle it to apr_filepath_merge, leaving ap_make_full_path stuff to merge URIs. I may have missed the correct choice to treat-as-uri, or to treat-as-path. Finally, ap_directory_walk now insists on real file names. If a module will circumvent the filesystem (e.g. it invents a bogus filename _just to get by_, we should now catch that.) An entry should appear in your error log. If a module (or an action - I'll look!) needs to bypass the filesystem to do funny business, that's fine, it just returns an OK result code from the new map_to_storage hook (register it simply as APR_HOOK_MIDDLE) if it can claim the request. This alone should eliminate entire classes of security advisories that have revolved around canonical paths, 'tricking the server' into serving instead of parsing dynamic content, etc. More work remains, but this was the underpinning. Bill
Re: Comments on accept-mutex/single-listen patch ??
At 11:00 AM -0400 8/28/01, Jeff Trawick wrote: The order it checks for (at the moment :) ) is sysvsem, flock, pthread mutex, fcntl. The last match wins (i.e., fcntl is preferred). This can be overridden on a platform basis in apr_hints.m4 by setting the variable apr_lock_method. That's cool. why is SingleListen needed? Pretty much to make SINGLE_LISTEN runtime rather than compile time... Again, to give the admins more control over how Apache handles mutexing. I'm not totally against it, it just seems that it is for playing around (sort of like USE_NONE_SERIALIZED_ACCEPT) or trying to work around an Apache bug (i.e., maybe there is some platform/version where we're supposed to turn on SINGLE_LISTEN_UNSERIALIZE_ACCEPT but don't). Why can't they compile this in? This would seem to be useful in extremely rare circumstances, and only for somebody who really knows what they are doing. Agreed... But there have been times when, as an admin, I wished that I had the capability... I still don't grok why SingleListen is needed. In fact, it seems down right dangerous and I am -1 on this directive until someone bashes me with a clue stick :-) Does everyone understand the S_L_U_A optimization? Apache httpd must call accept() to pick up inbound connections. Apache httpd runs with multiple threads/processes that all call accept() to pick up connections. The issue is this: do we allow all the threads/processes to all call/block in the accept() waiting for connections? The answer depends on the capabilities of the OS, specifically how accept() is implemented in the OS. I know of at least two problems with allowing multiple threads/processes to block in accept(): 1. thundering herd This is the commonly cited problem. When a connection comes in, ALL the threads/procs blocked on the accept wake up but only one is selected to accept the connection. This is a performance problem. 2. lock-ups and seg faults Some systems have some funky timing windows inside the accept() call that will cause threads to hang and or seg fault inside the accept The common solution to fix this problem is to mutex access to the accept() call. The 'problem' with this solution is that it introduces two additional system call per handled connection (lock and unlocl). Some OSes have implemented versions of accept() that do not exhibit the problems above. For these OSes, it is okay to allow multiple threads/procs into the accept call at once, saving the overhead of making an additional lock/unlock call per connection. Apache recognizes these systems by setting the S_L_U_A define in ap_config.h. If S_L_U_A is defined for a particular version of an OS, that tells Apache httpd that it is okay to allow multiple threads/proces into the accept(). So S_L_U_A is defined for those systems that support it, and it is not defined for those systems that do not support it. If httpd is configured with multiple listeners, S_L_U_A is irrelevant because you have to select() before calling accept(). And to the best of my knowledge, it is always bad to have multiple threads/processes block in select(), for all OS'. In the multi listener config, SingleListen will enable the admin to force httpd to make all the threads/processes to block in accept, even if the system cannot reliable support this. Why is this good? The only benefit I see to SingleListen is to enable an admin to turn -off- the S_L_U_A optimization in the single listener case. I have never seen the need to do this. Bill
Re: Apache 2.0.25 tagged
Ryan Bloom wrote: I have just finished tagging the tree. I'll be rolling the tarball in a few minute. Please look at httpd://dev.apache.org/dist in about 30 minutes for the tarballs. just a quick update. I grabbed installed the tarball on daedalus, port 8092. Static pages seem fine, but suexec/bugs.apache.org has a problem. When I hit bugs.apache.org:8092 with a browser, I get 500 errors with Premature end of script headers in the error log. Looked at install_dir/sbin/suexec, and it is a libtool shell script. Grabbed the suexec binary out of src_dir/support/.libs and copied it into install_dir/sbin/ , still get 500s. I suspect the suexec logic in the Makefile needs tweaking. Greg
Re: [PATCH] fix comments in the MPMs
On Wed, Aug 29, 2001 at 08:58:50PM -0400, Cliff Woolley wrote: On Wed, 29 Aug 2001, Aaron Bannert wrote: I posted this before, but I think Justin distracted everyone by saying that he still wanted -X funtionality. That's all fine and dandy, but the comments are just plain wrong today, so this patch fixes them. (Hmmm, I wonder if it's still like this in worker too...) Committed, though I did a s/it's/its/g; on it. =-) And I would have snuck it through if it wasn't for you pesky kids... I'd also love to see a patch that looked for -X on the command line and exited with an error message to the console saying that -X doesn't exist anymore and you should consider using -DONE_PROCESS or -DNO_DETACH... Lemme see what I can come up with... -aaron
Re: 2.0.25 on FreeBSD 4.2-R -- 404 returns text/plain error page
William A. Rowe, Jr. wrote: I'll try reproducing on Win32. [Dang me for testing with IE! Mozilla from now on, promise!!! Whatever happened to that little 'show http headers' feature from Mozilla .91???] I dunno, but I have a tiny little VB utility to get HTTP headers without having to do the whole telnet thing. Lemme know if you want it. -- Jerry Baker PGP Key: http://www.jerrybaker.org/pgp.html LAME MP3 Encoder Binaries: http://www.jerrybaker.org/lame/ Apache 2.0 Web server Installer: http://www.jerrybaker.org/apache/
Re: 2.0.25 on FreeBSD 4.2-R -- 404 returns text/plain error page
As a side note, some portions of the code are compiled with -D_REENTRANT -D_THREAD_SAFE even when building using the prefork mpm. Why? Doesn't that have the potential to do the wrong thing on some platforms? No, it would do the wrong thing if they were not defined. They are required for the entire executable if any part of the exec has been compiled with those flags. In our case, since modules like PHP and others will be compiled with those flags, we must always compile with those flags or mod_php's return values for errno won't be correctly interpreted by the httpd core (a problem that was fixed in some version of 1.3.x by always setting those flags on platforms that support it). Roy
[PATCH] helpful errors if -X is used on command line
On Wed, Aug 29, 2001 at 08:58:50PM -0400, Cliff Woolley wrote: I'd also love to see a patch that looked for -X on the command line and exited with an error message to the console saying that -X doesn't exist anymore and you should consider using -DONE_PROCESS or -DNO_DETACH... Roy/Justin may want to produce a patch to re-enable -X functionality and undo this, but until then this at least tries to tell the user what they can do instead. -aaron Index: server/main.c === RCS file: /home/cvspublic/httpd-2.0/server/main.c,v retrieving revision 1.99 diff -u -r1.99 main.c --- server/main.c 2001/05/22 01:31:11 1.99 +++ server/main.c 2001/08/30 01:18:56 @@ -365,6 +365,17 @@ break; case 'h': usage(process); +break; +case 'X': +printf(The -X option no long exists.\n + Some MPMs will respect the following runtime parameters:\n +-DNO_DETACH- Prevent the parent process from detaching\n + from its controlling terminal.\n +-DONE_PROCESS - Prevent the parent process from forking\n + off child processes. [implies -DNO_DETACH]\n + ); +destroy_and_exit_process(process, 0); +break; } } Index: include/http_main.h === RCS file: /home/cvspublic/httpd-2.0/include/http_main.h,v retrieving revision 1.19 diff -u -r1.19 http_main.h --- include/http_main.h 2001/02/16 04:26:31 1.19 +++ include/http_main.h 2001/08/30 01:18:56 @@ -63,7 +63,7 @@ * in apr_getopt() format. Use this for default'ing args that the MPM * can safely ignore and pass on from its rewrite_args() handler. */ -#define AP_SERVER_BASEARGS C:c:D:d:f:vVlLth? +#define AP_SERVER_BASEARGS C:c:D:d:f:vVlLth?X #ifdef __cplusplus extern C {
please make SIG_GRACEFUL configurable
This has been on my to-do list for ages. The decision to change from SIGUSR1 to SIGWINCH just because a particular old version of Linux threads happens to suck was a bad decision. Hard-coding the value within a bunch of places in httpd was just bad coding. I would really appreciate it if someone coded up a patch to add an AP_SIG_GRACEFUL definition, apply it everywhere in the code (and in the control scripts), and then make it configurable using configure [default=SIGUSR1]. To make it even better, we should have a way to signal it using httpd itself httpd restart httpd graceful httpd stop would check for an existing process and send it the appropriate signal. That way we wouldn't be spreading implementation assumptions throughout the support code. Roy
Re: [PATCH] fix comments in the MPMs
On Wed, 29 Aug 2001, Aaron Bannert wrote: On Wed, Aug 29, 2001 at 06:13:47PM -0700, Roy Fielding wrote: RGH! The reason it wasn't committed is because the lack of -X is a stupid-ass leftover from a bad decision and changing the comments doesn't make any sense when we should be committing Justin's patch to reinstate -X on all MPMs. I agree, but we shouldn't have incorrect comments sitting around in 5 MPMs just because we can't all agree on how -X/-DONE_PROCESS should work. (I liked -X, btw) I agree with Aaron on both counts. At least we're consistent now. If somebody right now wants to use -X and can't figure out why it won't work, at least they won't go to code, see the comment that -X SHOULD work, and wonder WTF the problem is. When the leftover is resolved, the comments are trivial to revert to maintain that consistency. --Cliff -- Cliff Woolley [EMAIL PROTECTED] Charlottesville, VA
Re: please make SIG_GRACEFUL configurable
On Wed, 29 Aug 2001, Roy T. Fielding wrote: it even better, we should have a way to signal it using httpd itself httpd restart httpd graceful httpd stop would check for an existing process and send it the appropriate signal. That way we wouldn't be spreading implementation assumptions throughout the support code. apachectl already has some values substituted at configure time... might as well just substitute in the requisite signals as well. --Cliff -- Cliff Woolley [EMAIL PROTECTED] Charlottesville, VA
Re: 2.0.25 on FreeBSD 4.2-R -- 404 returns text/plain error page
On Wed, Aug 29, 2001 at 06:01:35PM -0700, Marc Slemko wrote: On Wed, 29 Aug 2001, Justin Erenkrantz wrote: On Wed, Aug 29, 2001 at 04:14:39PM -0600, Charles Randall wrote: Using the prefork mpm on FreeBSD 4.2-R with a default installation (./configure --prefix=/my/full/path -with-port=8080) a request for a non-existant page (E.g., /bogus) returns the HTML error document as text/plain. Yup, that's a bug. I don't *think* it is a showstopper though. I can Erm... it is a showstopper from making it beta, that's for sure. No big deal. Let's release it as an alpha. Cheers, -g -- Greg Stein, http://www.lyra.org/
Re: 2.0.25 on FreeBSD 4.2-R -- 404 returns text/plain error page
On Wed, 29 Aug 2001, Greg Stein wrote: On Wed, Aug 29, 2001 at 06:01:35PM -0700, Marc Slemko wrote: On Wed, 29 Aug 2001, Justin Erenkrantz wrote: On Wed, Aug 29, 2001 at 04:14:39PM -0600, Charles Randall wrote: Using the prefork mpm on FreeBSD 4.2-R with a default installation (./configure --prefix=/my/full/path -with-port=8080) a request for a non-existant page (E.g., /bogus) returns the HTML error document as text/plain. Yup, that's a bug. I don't *think* it is a showstopper though. I can Erm... it is a showstopper from making it beta, that's for sure. No big deal. Let's release it as an alpha. This is a problem simply with the multi-language error-docs. If you want to go beta, just comment them out of the default config file. I doubt very much else will be hit by this problem. Joshua.
Re: [PATCH] fix comments in the MPMs
On Wed, Aug 29, 2001 at 05:44:27PM -0700, Aaron Bannert wrote: I posted this before, but I think Justin distracted everyone by saying that he still wanted -X funtionality. That's all fine and dandy, but the comments are just plain wrong today, so this patch fixes them. (Hmmm, I wonder if it's still like this in worker too...) I totally forgot about this patch since I got commit access. Thanks for reminding me. =-) (In my defense, I posted a patch to add -X back in - not my fault no one committed it...) For those that weren't around the last time we discussed this, a pointer to the archive... My patch to add -X back: http:[EMAIL PROTECTED]%3e Amazingly, the patch still applies today without any errors. I've included a fresh patch below. Also posted was a compromise to give a warning about -X: http:[EMAIL PROTECTED]%3e To recap votes from the last time: Ryan said -0.9 (non-veto) Dean and Roy said +1. With my vote which now counts, we have three +1s and a non-veto. I'll wait until tomorrow night to commit unless rbb changes to a veto or someone else vetoes. I've said all I have to say on this in the last thread. -- justin Index: include/http_main.h === RCS file: /home/cvs/httpd-2.0/include/http_main.h,v retrieving revision 1.19 diff -u -r1.19 http_main.h --- include/http_main.h 2001/02/16 04:26:31 1.19 +++ include/http_main.h 2001/08/30 02:12:45 @@ -63,7 +63,7 @@ * in apr_getopt() format. Use this for default'ing args that the MPM * can safely ignore and pass on from its rewrite_args() handler. */ -#define AP_SERVER_BASEARGS C:c:D:d:f:vVlLth? +#define AP_SERVER_BASEARGS C:c:D:d:f:vVlLth?X #ifdef __cplusplus extern C { Index: server/main.c === RCS file: /home/cvs/httpd-2.0/server/main.c,v retrieving revision 1.99 diff -u -r1.99 main.c --- server/main.c 2001/05/22 01:31:11 1.99 +++ server/main.c 2001/08/30 02:12:45 @@ -344,6 +344,10 @@ new = (char **)apr_array_push(ap_server_config_defines); *new = apr_pstrdup(pcommands, optarg); break; + case 'X': + new = (char **)apr_array_push(ap_server_config_defines); + *new = DEBUG; + break; case 'f': confname = optarg; break; Index: server/mpm/beos/beos.c === RCS file: /home/cvs/httpd-2.0/server/mpm/beos/beos.c,v retrieving revision 1.60 diff -u -r1.60 beos.c --- server/mpm/beos/beos.c 2001/08/15 21:11:58 1.60 +++ server/mpm/beos/beos.c 2001/08/30 02:12:45 @@ -944,10 +944,17 @@ static void beos_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp) { static int restart_num = 0; -int no_detach = 0; +int no_detach = 0, debug; -one_process = !!ap_exists_config_define(ONE_PROCESS); -no_detach = !!ap_exists_config_define(NO_DETACH); +debug = ap_exists_config_define(DEBUG); + +if (debug) +no_detach = one_process = 1; +else +{ +one_process = ap_exists_config_define(ONE_PROCESS); +no_detach = ap_exists_config_define(NO_DETACH); +} /* sigh, want this only the second time around */ if (restart_num++ == 1) { Index: server/mpm/perchild/perchild.c === RCS file: /home/cvs/httpd-2.0/server/mpm/perchild/perchild.c,v retrieving revision 1.76 diff -u -r1.76 perchild.c --- server/mpm/perchild/perchild.c 2001/08/30 00:55:50 1.76 +++ server/mpm/perchild/perchild.c 2001/08/30 02:12:45 @@ -1326,11 +1326,18 @@ static void perchild_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp) { static int restart_num = 0; -int no_detach = 0; +int no_detach = 0, debug; int i; -one_process = !!ap_exists_config_define(ONE_PROCESS); -no_detach = !!ap_exists_config_define(NO_DETACH); +debug = ap_exists_config_define(DEBUG); + +if (debug) +no_detach = one_process = 1; +else +{ +one_process = ap_exists_config_define(ONE_PROCESS); +no_detach = ap_exists_config_define(NO_DETACH); +} /* sigh, want this only the second time around */ if (restart_num++ == 1) { Index: server/mpm/prefork/prefork.c === RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v retrieving revision 1.199 diff -u -r1.199 prefork.c --- server/mpm/prefork/prefork.c2001/08/30 00:55:50 1.199 +++ server/mpm/prefork/prefork.c2001/08/30 02:12:46 @@ -1319,10 +1319,17 @@ static void prefork_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp) { static int restart_num = 0; -int no_detach = 0; +int no_detach = 0, debug; -no_detach = !!ap_exists_config_define(NO_DETACH); -one_process =
Re: please make SIG_GRACEFUL configurable
On Wednesday 29 August 2001 18:21, Roy T. Fielding wrote: This was discussed at length before, and it was decided that we should use the same signal on all platforms for all MPMs (assuming the platform supports signals). Making this be a different signal on different platforms is just plain wrong. Ryan This has been on my to-do list for ages. The decision to change from SIGUSR1 to SIGWINCH just because a particular old version of Linux threads happens to suck was a bad decision. Hard-coding the value within a bunch of places in httpd was just bad coding. I would really appreciate it if someone coded up a patch to add an AP_SIG_GRACEFUL definition, apply it everywhere in the code (and in the control scripts), and then make it configurable using configure [default=SIGUSR1]. To make it even better, we should have a way to signal it using httpd itself httpd restart httpd graceful httpd stop would check for an existing process and send it the appropriate signal. That way we wouldn't be spreading implementation assumptions throughout the support code. Roy -- __ Ryan Bloom [EMAIL PROTECTED] Covalent Technologies [EMAIL PROTECTED] --
Re: 2.0.25 on FreeBSD 4.2-R -- 404 returns text/plain error page
On Wed, Aug 29, 2001 at 08:20:38PM -0700, Justin Erenkrantz wrote: HEAD looks like it has this problem fixed (the buffered read fixes perhaps?). Please check it out and see if it works for you with the latest CVS. No, it's not fixed. My bad. I had a stale config which had SetOutputFilter instead of AddOutputFilter for the error pages. What does SetOutputFilter do that AddOutputFilter doesn't? I'm drilling down to see what's up. -- justin
Re: 2.0.25 on FreeBSD 4.2-R -- 404 returns text/plain error page
From: Justin Erenkrantz [EMAIL PROTECTED] Sent: Wednesday, August 29, 2001 10:29 PM On Wed, Aug 29, 2001 at 08:20:38PM -0700, Justin Erenkrantz wrote: HEAD looks like it has this problem fixed (the buffered read fixes perhaps?). Please check it out and see if it works for you with the latest CVS. No, it's not fixed. My bad. I had a stale config which had SetOutputFilter instead of AddOutputFilter for the error pages. What does SetOutputFilter do that AddOutputFilter doesn't? I'm drilling down to see what's up. -- justin Nothing that Apache hasn't done forever (incorrectly) :( Patch in 3 minutes.
Re: [PATCH] 2.0.x pre-alpha support for Cygwin
* srclib/apr/file_io/unix/dir.c: changed a suspicious #ifdef statement. Is this a missconfiguration of thread vs. non-thread #ifdef exclusion?!?! I am leaving the question of this patch to the more gifted. I see where you are coming from, but I read the original (and patch) three times, and came to three different conclusions. Someone want to determine before we tag and roll? --- httpd-2_0_22/srclib/apr/file_io/unix/dir.c Fri Jun 15 20:04:43 2001 +++ httpd-2_0_22-cygwin/srclib/apr/file_io/unix/dir.c Thu Aug 9 10:00:09 2001 @@ -112,7 +112,7 @@ { apr_status_t ret = 0; #if APR_HAS_THREADS defined(_POSIX_THREAD_SAFE_FUNCTIONS) \ - !defined(READDIR_IS_THREAD_SAFE) + defined(READDIR_IS_THREAD_SAFE) struct dirent *retent; ret = readdir_r(thedir-dirstruct, thedir-entry, retent); The code is correct as it is today. Basically, it is possible for platforms to have defined _POSIX_THREAD_SAFE_FUNCTIONS, and a thread-safe readdir. If both of those conditions are true, then we want to use readdir, not readdir_r. This if statement handle that condition. Ryan __ Ryan Bloom [EMAIL PROTECTED] Covalent Technologies [EMAIL PROTECTED] --