One of 2 fixes to quell a compiler warning. According to fanf@apache.org
> Before C99 the correct way to print a size_t is to use %lu, since
> long was guaranteed to be the widest integral type, so redoing the
> fix on that basis would be better. However with C99 size_t can be
> as wide as unsigned long long so you need to use that format to
> be safe, but then you compromise portability.
So options; simply cast to (int) as I know the value is small; use %lu
without a cast - but get warnings later on >C99. Or kind of the compromize
below; do %lu but cast to be sure.
Martin Kraemer [Mon, 8 Oct 2001 15:49:33 +0000 (15:49 +0000)]
==Port of Apache 1.3.20 to AtheOS==
Rodrigo Parra Novo <rpn@terra.com.br> writes:
I have ported Apache 1.3.20 to AtheOS (A new OS, described on
www.atheos.cx), following the rules described by the PORTING document,
which can be found in Apache's src/ directory.
I'm sending the (rather simple) patch attached. It would be nice if
someone from the Apache team could take a look at the patch, and tell me
if anything is still missing. It would be also nice if (hopefully) this
patch could be added to the current Apache 1.3 branch, on CVS.
I (and others) have been running Apache on AtheOS for some time now,
and everything seems to work correctly, with the following exceptions:
1. AtheOS does not use mmap() and shmget(), so we are using the
ScoreBoard on disk, for now;
2. AtheOS does not support DSO for the moment, as shared libraries
are treated a bit differently from the way they are treated on UNIX.
Submitted by: Rodrigo Parra Novo <rpn@terra.com.br>
Reviewed by: Martin Kraemer
Jim Jagielski [Mon, 8 Oct 2001 14:29:30 +0000 (14:29 +0000)]
Fix the EXPAT logic to the new meaning... Before, it was simply there to
check that expat-lite existed, which was kind of bogus... Now, we
allow it to choose which Expat we want. We prefer the system's Expat
if available but will use expat-lite as a backup. We can also bypass
that as well.
Martin Kraemer [Sat, 6 Oct 2001 22:01:10 +0000 (22:01 +0000)]
Per Ken's veto, the default setting for the manual dir was reverted to the
pre-1.3.21 value of @@ServerRoot@@/htdocs/manual.
However, using the config.layout mechanism, or using the --manualdir= switch
of configure allows you to override this default, and "make install" will
not only install into the defined location, but will also fix the config
file for you (the Alias and <Directory > paths are fixed).
On non-unix platforms, this may be problematic, as the sed pattern
replaces @@ServerRoot@@/htdocs/manual by the setting of $(manualdir).
If that does not work for you, then please adapt whatever you used to
"make install" (probably not Apache's Makefile.tmpl which contains
this sed regex).
Right this change to conform to my minimal interpretation of Ken Coar's
veto over creating /manual/ under ServerRoot. It's possible he also
ment to veto the Alias, I'm not clear. If that's the case, these alias
sections can be removed entirely. I personally believe they are goodness.
Jeff Trawick [Fri, 5 Oct 2001 14:20:53 +0000 (14:20 +0000)]
Here is the http_main.c change to fix the compilation error on TPF.
This change is within an "#if defined(HAVE_TPF_CORE_SERIALIZED_ACCEPT)"
block of code so it should not affect any other platforms.
Submitted by: David McCreedy
Reviewed by: Jeff Trawick
Ken Coar [Fri, 5 Oct 2001 00:53:14 +0000 (00:53 +0000)]
Fix the file-owner and file-group processing; I inadvertently
added them as 'and' operations, so if they were specified but
not matched, nothing else could match either. Fixed..
Justified fixed courier is the single hardest format in the world to
read. Having generated in excess of a billion documents in my former
life, I will play authority on that ;)
LoadModule isn't sufficient. Quick testing of foo.pdf.gz files
(with a mime types declaration of app/x-pdf rather than app/pdf)
still returns app/pdf - so mime_magic is run first. Other modules
may have been similarly misordered.
This patch creates an absolute reference of all modules to Add.
If I've misworded anything, feel free to correct me. The module
order itself is straight from www.apache.org's conf.
Fix the compilation error on TPF.
This change is within an "#if defined(HAVE_TPF_CORE_SERIALIZED_ACCEPT)"
block of code so it should not affect any other platforms.
[David McCreedy <McCreedy@us.ibm.com>]
I have no idea if the load order is correct here, I suspect it's close.
Would some 1.3 module ordering guru please double check ... the built
in modules are detailed in apache-1.3/src/os/modules.c.
Bill Stoddard [Wed, 3 Oct 2001 22:35:19 +0000 (22:35 +0000)]
Fix a mismatching issue, where index.html.foo.en had recognized .html and
.en components, and exceptions index and foo. This patch will ignore the
'missing' exception html from the request, and go on to test the exception
foo in the list.
This does -not- imply that a request for index.foo will succeed, in the
example above. The pattern match tests index.foo[.*] so we wouldn't find
index.html.foo.anything. The pattern matching proposed at one time by
Francis Daly would allow index.foo to succeed as well [although many to
many matching is dangerous, see comments in this patch.]
Accept service names modified by the user in the Win/2000 Service Control
Panel applet. Allow the admin to specify -W dependency, where the given
service will become a dependency for Apache when configured with the
-k install and config options. Finally, document -w and -W.
Mark J. Cox [Wed, 3 Oct 2001 17:46:57 +0000 (17:46 +0000)]
Add a guide to Apache 1.3.21 changes, taken from the commit logs so not
to miss things in CHANGES and sorted into categories, with minor changes
lumped together and some explanations changed to be more readable.
PR:
Obtained from:
Submitted by: Mark Cox
Reviewed by: Several Red Hat Apache Week team members
Greg Stein [Wed, 3 Oct 2001 12:59:03 +0000 (12:59 +0000)]
Use an installed Expat when available, rather than the builtin one.
Presuming the installed one is a shared library, then this should resolve
some of the longstanding issues with mod_perl / XML::Parser::Expat.
Lars Eilebrecht [Tue, 2 Oct 2001 21:54:32 +0000 (21:54 +0000)]
Update mime.types file.
Map video/vnd.mpegurl to mxu according to
ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/video/vnd.mpegurl
and audio/x-mpegurl to m3u, because it is commonly used.
Submitted by: Heiko Recktenwald <uzs106@uni-bonn.de>
Reviewed by: Sander van Zoest, Lars Eilebrecht
Bill Stoddard [Tue, 2 Oct 2001 21:01:31 +0000 (21:01 +0000)]
Modified mod_mime and mod_negotiation to prevent mod_negotiation
from serving any multiview variant containing one or more
'unknown' filename extensions. In PR #8130, mod_negotiation was
incorrectly serving index.html.zh.Big5 when better variants were
available. The httpd.conf file on the failing server did not have
an AddLanguage directive for .zh, which caused mod_mime to loose
the file_type information it gleened from parsing the .html
extension. The absence of any language preferences, either in
the browser or configured on the server, caused mod_negotiation
to consider all the variants equivalent. When that occurs,
mod_negotiation picks the 'smallest' variant available, which
just happened to be index.html.zh.Big5.
[Bill Stoddard, Bill Rowe] PR #8130
Correction to the changelog for revision 1.12 (the committed note applied
to mod_unique_id.)
Rev 1.12 simply changed the config parser to test ap_os_is_path_absolute
rather than looking for a leading '/' (which didn't work on Netware, OS/2
nor Win32.)
Steal a play from mod_proxy, which taught us this Win32 lesson. Threaded
local storage must be allocated with the Tls*() family of functions, or
the dynamically loaded module _will_ clobber our clib's (msvcrt's) own
thread saftey stacks.
I _don't_ know what the other multithread platforms require in terms of
initialization. OS2/Netware maintainers can steal the idea from the
Win32 get_cur_unique_id() implementation, to initialize other copies
on the fly (if required.) They may already call child_init for every
thread, so child_init could call the master_init to set up this thread's
variables. Remember that the get_cur_unique_id() applies to straight
un*x fork implementations as well, so protect with #ifdef PLAT sections.
Bill Stoddard [Tue, 2 Oct 2001 16:05:20 +0000 (16:05 +0000)]
Back port W. Rowe's 2.0 a fix for the /?M=D autoindex problem.
These two lines missing from the fast-redirect logic of mod_negotation.c are what
allowed mod_dir to reconstruct the _original_ path (to index.html instead of the
new-found index.html.foo), merging the uri (unchanged) with the query string.
It then failed, leaving an autoindex listing iff the user provided a query string.
Martin Kraemer [Thu, 27 Sep 2001 18:12:04 +0000 (18:12 +0000)]
* configure: added case for Cygwin to translate shared module
extensions from .so to .dll. Almost the same as for OS2.
* htdocs/manual/cywin.html: added related changes to the configure
and build process for shared module DLLs.
* src/Configure: cleaned up Cygwin case for OS specific variable
declaration. Removed no longer need $DLL_IMPORT_DEF and
$DLL_IMPORT_LIB variables.
* src/Makefile.tmpl: removed no longer needed $DLL_IMPORT_LIB
variable.
* src/main/http_main.c: added dllexport declaration for int REALMAIN
for SHARED_CORE support.
* src/modules/standard/Makefile.Cygwin: added this new file to
reflect the extra rules needed to link the shared module DLLs. Very
similar to src/modules/standard/Makefile.OS2.
* src/os/cygwin/os.h: added explicit dllimport and dllexport
declarations for API_VAR_EXPORT and API_EXPORT(type).
Bill Stoddard [Wed, 26 Sep 2001 14:41:11 +0000 (14:41 +0000)]
Win32: Set errno to ENAMETOOLONG when os_stat() returns -1.
This will fix problem where Apache on Windows can return a directory index when
it should return a negotiated file. read_types_multi() iterates over
the entries in a directory to build a candidate list of
files to negotiate. ap_sub_req_lookup_file() is called for each file
which in turn calls stat() (os_stat() on Windows) to verify the file exists.
mod_negotiation will decline the request (rather than failing the
request as it should) if os_stat() fails and errno is not set.
Mark J. Cox [Wed, 26 Sep 2001 08:00:03 +0000 (08:00 +0000)]
Update the mime.types file to the registered media types as
of 2001-09-25 at IANA, and add xsl extension. Also add .so and .dll
as already applied to Apache 2.0
PR:
Obtained from:
Submitted by:
Reviewed by:
Remove showstopper; as trawick commit of 2001/09/11 12:19:09
has cleaned them up.
Added a >1 comparison to not do statistics if there are less
than 2 entries (and hence the standard deviation check would
explode on a divide by zero).
Some Cygwin portability changes, from
Message-ID: <3BAB4213.74AA3C0F@wapme-systems.de>
Did not include the below patch to install.sh since this looked like
it would affect other OSs...
# Check if we need to add an executable extension (such as ".exe")
-# on specific OS to src and dst
+# on specific OS to src and dst.
+# At least Cygwin requires this to ensure a clean "make install".
if [ -f "$src.exe" ]; then
- if [ -f "$src" ]; then
- : # Cygwin [ test ] is too stupid to do [ -f "$src.exe" ] && [ ! -f "$src" ]
- else
ext=".exe"
- fi
fi
src="$src$ext"
dst="$dst$ext"
ErrorDocument 404 pointing to a parsed html file with a
<!--#include virtual="file" --> with a request URI containing
%2f would result in a segfault (NULL pointer deref, not a
security problem).