1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-26 05:42:34 +03:00
Commit Graph

73 Commits

Author SHA1 Message Date
Ryan Bloom
8a75c27537 Add the referer to the error log if one is available.
PR:	73
Submitted by:	Markus Gyger <mgyger@itr.ch>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86951 13f79535-47bb-0310-9956-ffa450edef68
2000-11-14 02:42:51 +00:00
Ryan Bloom
140586d14f Namespace protect the rest of the macros defined by ap_config.h
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86661 13f79535-47bb-0310-9956-ffa450edef68
2000-10-19 00:05:00 +00:00
Ryan Bloom
16a54f95b0 Fix piped logs in 2.0. This basically:
1) cleans up an annoying type that was getting in my way while I was
   trying to fix things.
2) Makes some of the allocations pcalloc instead of palloc
3) The arg array passed to create_process is a const *char *, not
   const *char [].
PR:     6642


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86640 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 06:09:10 +00:00
William A. Rowe Jr
d6490633eb Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbols
for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper)
  and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE.
  All _VAR_ flavors changes to _DATA to be absolutely clear.
  Thank you Greg, for the most obvious suggestion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86609 13f79535-47bb-0310-9956-ffa450edef68
2000-10-16 06:05:15 +00:00
Brian Havard
aed89bc6b4 Add #include <unistd.h> for getpid() prototype.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86010 13f79535-47bb-0310-9956-ffa450edef68
2000-08-06 14:34:22 +00:00
William A. Rowe Jr
1a9db204f5 Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation...
see src/lib/apr/apr_compat.h for most details.
  Also a few minor nits to get Win32 to build.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86008 13f79535-47bb-0310-9956-ffa450edef68
2000-08-06 06:07:53 +00:00
Ryan Bloom
0356da996c Remove some old APIs. These were left around for legacy modules. Since
we have broken all modules anyway, this is a good time to cleanup a bit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85999 13f79535-47bb-0310-9956-ffa450edef68
2000-08-05 17:32:08 +00:00
Doug MacEachern
059d8dd212 prefix libapr functions and types with apr_
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85976 13f79535-47bb-0310-9956-ffa450edef68
2000-08-02 05:27:38 +00:00
William A. Rowe Jr
84fb2aec23 This should be clean... ap_snprintf already holds a byte for the
null terminator, and this patch sets aside whatever space is needed
  for the newline termination.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85880 13f79535-47bb-0310-9956-ffa450edef68
2000-07-25 02:05:49 +00:00
William A. Rowe Jr
847b20108c Add APR_EOL_STR for a platform specific text delimiter, provided by
apr.h (defined in apr.h.in and apr.hw).  This is needed -only- in APR
  created files (true raw files) such as logs.  It is not required in any
  splat to screen (stderr/stdout) formatting, nor any html markup.

  Some other modules slipped through in the prior apr_strings.h commit.
  Sorry 'bout that.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85878 13f79535-47bb-0310-9956-ffa450edef68
2000-07-25 01:06:32 +00:00
Ryan Bloom
22d9fbdec0 Move all APR functions related to strings to their own directory, and
create a new header for those functions.  This is the first step to
removing the apr/lib directory completely, and moving those files/functions
to descriptive directories.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85867 13f79535-47bb-0310-9956-ffa450edef68
2000-07-21 19:50:58 +00:00
Ryan Bloom
0207f837c4 Apache doesn't actually check for stdarg.h, but APR does. Just use the
APR defined APR_HAVE_STDARG_H to check for the existance of stdarg.h


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85833 13f79535-47bb-0310-9956-ffa450edef68
2000-07-13 16:26:47 +00:00
Bill Stoddard
51810589f5 Save the write end of the pipe. pipe_log_spawn really needs to be combined with
log_child.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85828 13f79535-47bb-0310-9956-ffa450edef68
2000-07-12 22:00:58 +00:00
Bill Stoddard
af21383533 Ooops... Didn't notice this one until I tried compiling with APR_HAS_OTHER_CHILD
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85826 13f79535-47bb-0310-9956-ffa450edef68
2000-07-12 18:54:55 +00:00
Bill Stoddard
c8527e9280 Fix a nasty stack corruption. ap_proc_t should be allocated out of the same
pool passed to ap_create_process. A little further down the road to getting
reliable piped logs working on Win32.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85825 13f79535-47bb-0310-9956-ffa450edef68
2000-07-12 18:40:26 +00:00
Jeff Trawick
b5c0ae056b Include strings.h for strcasecmp(), strncasecmp(), and bzero().
Include time.h for time().

This removes a bunch of compiler warnings with gcc -Wall on AIX.
Submitted by:	Jeff Trawick, Victor Orlikowski


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85723 13f79535-47bb-0310-9956-ffa450edef68
2000-06-28 14:33:48 +00:00
Jeff Trawick
87e0219916 ap_create_pipe was changed to return a pipe with both handles
blocking (previously, both handles were non-blocking).

ap_set_pipe_timeout() is now the only way to manipulate the
blocking state of the pipe.  Pass -1 for timeout to make it
blocking; pass 0 for timeout to make it non-blocking.

ap_block_pipe() is gone.

A few minor bugs were fixed along the way.

OS-specific notes:

non-Unix in general:

Only Unix/BeOS currently has the optimization to keep track of the blocking
state.  This is used to avoid syscalls as well as to handle ap_put_os_file(),
which is a case where we don't know the blocking state of the handle we are
given.

OS/2:

ap_set_pipe_timeout() with timeout value > 0: The code didn't play with
the blocking state before and it doesn't still.  I did add logic for special
timeout values 0 and -1 to play with the blocking state.

ap_create_pipe():  old logic didn't do anything with the blocking state
of the second handle; it still doesn't; hopefully it is blocking

pre-BONE BEOS:

old code to make a pipe non-blocking was a no-op; now it returns
APR_ENOTIMPL

BONE: old code to make a pipe non-blocking; it passed &zero as the
parm to FIONBIO instead of &one; this bug was fixed

Win32:

The pipe was always created blocking before; no change

previously, ap_setprocattr_io() ignored the blocking flag; now it
respects it like other platforms and calls ap_set_pipe_timeout(p,0)
on appropriate pipe handles (Bill Stoddard was just working in
ap_set_pipe_timeout(), so I presume this is golden)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85637 13f79535-47bb-0310-9956-ffa450edef68
2000-06-20 19:36:50 +00:00
Ryan Bloom
750d8cc03c Protect system header files with the appropriate macros.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85558 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 23:03:05 +00:00
Jeff Trawick
bfbb1c736d Fix logging of errors creating the httpd.pid file.
perror() was converted to ap_log_error(), which will interpret the
specified APR error code properly.

The existing ap_log_error() call was changed so that the message is
formatted properly.  Note that this call is made from the mpm after
we detach from the foreground process, so it can only appear in the
log.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85551 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 21:39:57 +00:00
Jeff Trawick
93a6d2f3a7 Back out ap_set_default_perms(). Remove old logic to play with umask
around the creation of the httpd.pid file.  Pass explicit permissions to
ap_open(), omitting write-ability except by the owning user.  As always,
we end up with rw-r--r-- for the permissions unless the umask is something
unusual.

Note that the OS/2 and Win32 implementations of ap_open() ignore the
permissions parameter altogether.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85550 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 21:08:25 +00:00
Ryan Bloom
b44c18edd7 Add a new function ap_set_default_fperms. This allows people to set the
umask to be used when creating files.  This should change the permissions
of files created using APR_DEFAULT_OS.  Also removed a warning introduced
with the sys/stat.h changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85537 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 16:00:33 +00:00
Ryan Bloom
9803fc27fd Remove all occurances of strerror from Apache. ap_strerror works just
fine with standard errno values, and it is more portable.  This also allows
me to remove the check for strerror from Apache's configure script.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85486 13f79535-47bb-0310-9956-ffa450edef68
2000-06-09 18:57:16 +00:00
Jeff Trawick
130e171d62 Increase the size of the buffer passed to ap_strerror(); I saw
truncation of a particularly long message on OS/390, and useful
info was past char 100.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85443 13f79535-47bb-0310-9956-ffa450edef68
2000-06-06 14:51:06 +00:00
Ryan Bloom
6c75ebc1da Rename stdin, stdout, stderr from new ap_proc_t to in, out, and err because
Windows was having problems with the original names.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85285 13f79535-47bb-0310-9956-ffa450edef68
2000-05-24 00:15:09 +00:00
Ryan Bloom
f9f4c470a8 Convert ap_proc_t to a complete type. This lets us access the pid directly.
Only the prefork MPM has been ported so far, the rest of the Unix MPM's are
coming later today.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85279 13f79535-47bb-0310-9956-ffa450edef68
2000-05-23 21:04:03 +00:00
Manoj Kasichainula
aec887ec5e Remove all remaining instances in Apache code of
ap_{block,unblock}_alarms.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85265 13f79535-47bb-0310-9956-ffa450edef68
2000-05-21 05:31:09 +00:00
Roy T. Fielding
943ce40ca4 Remove an unused variable and warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85242 13f79535-47bb-0310-9956-ffa450edef68
2000-05-18 01:35:03 +00:00
Ryan Bloom
fcc4d8c669 Port reliable piped logs to mpmt_pthread and dexter. Also a couple of small
cleanups for reliable piped logs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85137 13f79535-47bb-0310-9956-ffa450edef68
2000-05-04 19:42:57 +00:00
Ryan Bloom
8c385f0dbd Make reliable piped logs work on 2.0.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85136 13f79535-47bb-0310-9956-ffa450edef68
2000-05-04 04:02:37 +00:00
Ryan Bloom
0a29229315 Make piped logs work again in 2.0. The next step is reliable piped logs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85114 13f79535-47bb-0310-9956-ffa450edef68
2000-04-30 21:21:51 +00:00
Bill Stoddard
4ea1a363d3 Get rid of ap_pool_t argument on ap_strerror
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85044 13f79535-47bb-0310-9956-ffa450edef68
2000-04-26 02:36:38 +00:00
Bill Stoddard
385effc089 Tell APR to truncate the httpd.pid file if it exists. Fix a bug in the
Windows side of APR to correctly handle this flag. Also fix related bug
in ap_write.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85039 13f79535-47bb-0310-9956-ffa450edef68
2000-04-25 23:15:46 +00:00
Ryan Bloom
52c04b67a7 Add support for pool to log_error_core. Also add ap_log_perror to allow
logging without either a request or server _rec.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85002 13f79535-47bb-0310-9956-ffa450edef68
2000-04-20 16:25:40 +00:00
Ryan Bloom
860eb11705 Add a pool to dupfile. There is no reason that when we duplicate a file, we would want to use the same pool for the duplicated file as we used for
the original file.  This should solve a problem we were having with
dieing quietly on startup, because we are no longer closing stderr in the
original process and then opening the config file as file descriptor 2.

The original problem report can be found in the message
<20000311232812.A1066@sanguine.linuxcare.com.au>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84985 13f79535-47bb-0310-9956-ffa450edef68
2000-04-17 19:57:30 +00:00
Ryan Bloom
de3a77dc01 Change ap_context_t to ap_pool_t. This compiles, runs, and serves pages
on Linux, but probably breaks somewhere.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84963 13f79535-47bb-0310-9956-ffa450edef68
2000-04-14 15:59:20 +00:00
Jeff Trawick
92cafef56b stop relying on a macro to map signal() to ap_signal(); call
ap_signal() directly


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84914 13f79535-47bb-0310-9956-ffa450edef68
2000-04-05 01:23:51 +00:00
Bill Stoddard
0b0be5337c Eliminate apr_win.h and apr_winconfig.h (and the ugly #ifdefs they cause).
Now, apr.h and apr_config.h are generated from apr.hw and apr_config.hw
at build time. At this point, the server will not compile on Windows because
of the recent DSO commits. Fixing those next.

Submitted by: Bill Rowe & Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84896 13f79535-47bb-0310-9956-ffa450edef68
2000-04-03 18:40:44 +00:00
Roy T. Fielding
057b29f829 Update to Apache Software License version 1.1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84878 13f79535-47bb-0310-9956-ffa450edef68
2000-03-31 08:44:21 +00:00
Jim Jagielski
70ef1e69d5 Backport the CSS security fixes to Apache 2.0a. Or is that forward
port? My sense of direction is all confused.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84751 13f79535-47bb-0310-9956-ffa450edef68
2000-03-13 20:27:29 +00:00
Ryan Bloom
b1c26f031a Fix all the License issues. Including:
s/Apache Group/Apache Software Foundation/
s/1999/2000/
s/Sascha's license/ASF license


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84725 13f79535-47bb-0310-9956-ffa450edef68
2000-03-10 00:07:37 +00:00
Ryan Bloom
1a47df7dd3 Fix the logic for ap_signal, so it is exposed in external header files in APR.
Also change the header file included in http_log.c.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84700 13f79535-47bb-0310-9956-ffa450edef68
2000-03-02 20:36:46 +00:00
dgaudet
7dd8a75266 clean up a bunch of -Wall/etc warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84698 13f79535-47bb-0310-9956-ffa450edef68
2000-03-02 11:05:17 +00:00
Bill Stoddard
2a1ed8bb9f Ahh, found ap_flush()!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84643 13f79535-47bb-0310-9956-ffa450edef68
2000-02-18 14:18:11 +00:00
Bill Stoddard
7e977c5c9e Update Windows ap_filedup() call to recognise when it is asked to dup2
a standard i/o handle. Return error if the dup2 handle is not one of the
standard i/o handles (because Windows does not support a dup2 style function
to operate on native file handles)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84638 13f79535-47bb-0310-9956-ffa450edef68
2000-02-17 19:03:52 +00:00
Bill Stoddard
bdad3347fb ap_dupfile (specifically dup2) is not available in a general form under Windows.
So use SetStdHandle directly. A single call to ap_dup2stderr() (or similar) could
replace the entire chunk of code in the #ifdef #else #endif block.  Ryan didn't
want to put this speciality function into APR, but we could put it into os.c
if folks are interested.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84624 13f79535-47bb-0310-9956-ffa450edef68
2000-02-15 22:51:23 +00:00
Bill Stoddard
b99c3eec37 First step to get piped logs working on Windows (and Unix as well).
There are still all kinds of problems in http_log.c. This patch just
barely scratches the surface.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84622 13f79535-47bb-0310-9956-ffa450edef68
2000-02-15 00:54:06 +00:00
Martin Kraemer
5bb2506c9a Enforce a sensible permission on the httpd.pid file.
Submitted by:	Frank Miller <frankm@system-associates.com>
Reviewed by:	Martin Kraemer


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84547 13f79535-47bb-0310-9956-ffa450edef68
2000-01-31 23:14:41 +00:00
Ryan Bloom
a8ce196da5 Finish the commits for the change in the header files. Basically, this hides
all of the Apache macros that modules don't need access to.  This should
have been committed with the modules, but I wasn't paying attention to the
directory I was in when I ran the commit.
Submitted by:	Manoj Kasichainula and Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84493 13f79535-47bb-0310-9956-ffa450edef68
2000-01-19 01:16:31 +00:00
dgaudet
faff1f01dd time overhaul:
- ap_time_t is a 64-bit scalar, microseconds since epoch
- ap_exploded_time_t corresponds to struct tm with a few extras

probably broken on anything except linux.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84413 13f79535-47bb-0310-9956-ffa450edef68
2000-01-09 05:18:31 +00:00
Ryan Bloom
8f26ac7df4 Separate the stat structure from the file structure and use ap_stat and
ap_getfileinfo in apache.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84397 13f79535-47bb-0310-9956-ffa450edef68
2000-01-06 14:43:41 +00:00