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

61 Commits

Author SHA1 Message Date
David Reid
35034e600c Change the code to reflect the recent API changes...
Alter http_vhost.c to use the new apr_get_inaddr fucntion.  Old code is still
there just in case it breaks.  can someone check it who knows this stuff?


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86890 13f79535-47bb-0310-9956-ffa450edef68
2000-11-09 15:09:50 +00:00
Ryan Bloom
4ee1d8eb59 Remove BUFF from the main server. :-) The buff code needs to remain as
a part of the server until the proxy is purged of BUFF however.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86878 13f79535-47bb-0310-9956-ffa450edef68
2000-11-09 00:37:06 +00:00
Ryan Bloom
134dbc9e7a Convert a lot of apr_ssize_t to apr_size_t. We don't ever accept or return
signed values in these integers, and we return the error codes directly,
so we should always report the number of bytes read/written correctly.  If
we have an error, that is 0 bytes.  If that is true, then using signed
values doesn't make any sense.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86857 13f79535-47bb-0310-9956-ffa450edef68
2000-11-07 20:21:55 +00:00
David Reid
60acdb0d07 We don't really want to fool around with socket structures if we don't have to,
and in this case we can get the ip address directly from the socket.  This
should mean that if we add more protocol support we don't have to worry about
this.  No doubt this is the first of many such changes...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86817 13f79535-47bb-0310-9956-ffa450edef68
2000-11-03 02:17:56 +00:00
Jeff Trawick
2730adb574 Fix a buglet in the APR-ization of ap_lingering_close() -- use APR_SO_TIMEOUT
instead of BO_TIMEOUT.  (We were actually setting a different socket option.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86785 13f79535-47bb-0310-9956-ffa450edef68
2000-11-01 15:42:50 +00:00
Ryan Bloom
a90cfa54f1 Make lingering close access the socket directly, instead of relying on
BUFF.  This has been tested, but all we can determine is that it doesn't
fail, not that it works.  This needs to be tested much better.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86709 13f79535-47bb-0310-9956-ffa450edef68
2000-10-23 10:46:20 +00:00
Jeff Trawick
902d55fc14 Get rid of a couple of buff-isms -- setting the B_EOUT flag in a couple
of places and doing ap_bread() in ap_lingering_close.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86700 13f79535-47bb-0310-9956-ffa450edef68
2000-10-22 13:20:36 +00:00
Ryan Bloom
946cd782e3 Change some of the BUFF calls to direct calls to the socket.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86666 13f79535-47bb-0310-9956-ffa450edef68
2000-10-19 01:24:10 +00:00
Ryan Bloom
d85bbfb847 This begins to remove BUFF from the server. The idea is to go very slowly
with this.  To begin with, we store both the socket and the BUFF in the
conn_rec.  Functions are free to use which ever they want, in the end all
of the data goes to the same place.  This modifies all of the MPMs except
Windows.  All of the Unix MPMs are working, but the others need to be
tested.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86651 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 19:12:16 +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
Ryan Bloom
bb8525b09d Add the first draft of the http_filter. In time this filter will split
the bucket brigade between the headers and the body.  Right now it just
converts \r\n to \n\0.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86412 13f79535-47bb-0310-9956-ffa450edef68
2000-10-06 06:07:07 +00:00
Jeff Trawick
b7d765272e Add a bit of infrastructure which will be needed for input filtering:
1) separate filter lists hanging off the r and the c

   requests start off with the same filter list as the connection

   the input filter list is not initialized for subrequests

   internal redirects start off with the same filter list as the
   connection

2) AddInputFilter directive (blatant rip-off of Ryan's AddOutputFilter
   directive); as with AddOutputFilter, the network is implicitly to the
   right of the specified filter list; this may not be the most
   intuitive way to specify the filters; not sure yet


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86403 13f79535-47bb-0310-9956-ffa450edef68
2000-10-05 16:55:10 +00:00
Jeff Trawick
a9a0b56629 Now that we have ap_add_input_filter(), rename ap_add_filter() to
ap_add_output_filter().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86401 13f79535-47bb-0310-9956-ffa450edef68
2000-10-05 12:01:48 +00:00
Ryan Bloom
8b56ba850a Connection oriented filters are now stored in the conn_rec instead of the
request_rec.  This means that a conn_rec must be supplied when calling
ap_add_filter.  The reason for this change is that we need to be able to
add the core_filter (whether or SSL or not) before we try to read the
request.  This way, if a request fails, we can actually send the error
page back to the client.  With this change, we add the core filter to the
conn_rec during the pre-connection phase.
Submitted by:	Ryan Bloom, Jeff Trawick, and Greg Ames


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86392 13f79535-47bb-0310-9956-ffa450edef68
2000-10-04 23:19:33 +00:00
Ryan Bloom
ba047efee0 Move where the CORE_IN filter is added to the server. We used to do this
in ap_new_connection, but that is bogus, because then other modules can't
put their own filter in.  Now, we do this in a new pre-connection hook
function.  Later, we will want to add some checking to make sure that this
is really an HTTP request that we are adding the filter for.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86364 13f79535-47bb-0310-9956-ffa450edef68
2000-10-02 19:52:37 +00:00
Ryan Bloom
7ae2f294fd Implement input filtering. This is definately not completely correct, but
it is a good first step.  It is possible to add filters when reading from
the client with this change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86359 13f79535-47bb-0310-9956-ffa450edef68
2000-10-02 00:47:28 +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
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
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
Jeff Trawick
db3c12a79e Fix some bad ap_log_error() invocations. Comment on a bad
ap_log_rerror() invocation.

Almost all of this is in code never compiled.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85860 13f79535-47bb-0310-9956-ffa450edef68
2000-07-17 22:11:47 +00:00
Jeff Trawick
73b1f79967 Remove const from ap_socket_t parameters on APR functions so that
APR can modify the ap_socket_t as it sees fit.  It may choose to
modify the ap_socket_t on functions which only read from the ap_socket_t
conceptually.

Note: http_connection::ap_new_apr_connection() passes its ap_socket_t
arg to one of the changed functions, so const was removed there also.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85700 13f79535-47bb-0310-9956-ffa450edef68
2000-06-26 20:37:49 +00:00
Roy T. Fielding
b17a3d6437 Removed the pointless ap_is_aborted macro.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85626 13f79535-47bb-0310-9956-ffa450edef68
2000-06-20 04:22:39 +00:00
Allan K. Edwards
6f4bcbf027 Add notes field to conn_rec
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85615 13f79535-47bb-0310-9956-ffa450edef68
2000-06-19 17:38:06 +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
Ryan Bloom
580852da85 Clean up a big chunk of ap_config.h. This basically stops ap_config.h from
including any files.  Because of this change, other files must include
their own headers.  I also cleaned up a couple of other bugs in some
modules because I had to compile them all.

I expect this to break multiple platforms, but this will be fixed over time.
The massive configure cleanup is almost done.  I will go through the files
one more time after this commit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85553 13f79535-47bb-0310-9956-ffa450edef68
2000-06-12 21:47:17 +00:00
William A. Rowe Jr
3f29977506 PR:
Obtained from:
Submitted by:
Reviewed by:

  Reverse out additional linkage argument from DECLARE_HOOK
  and IMPLEMENT_HOOK macros.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85319 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 22:53:48 +00:00
William A. Rowe Jr
86e2a18f2a This patch corrects the issues from the AP_EXPORT and linkage
specification arguments to the ap_hooks.h declarations.  As with
  the APR_ and AP_ patches, API_VAR_EXPORT becomes API_EXPORT_VAR,
  and MODULE_VAR_EXPORT becomes MODULE_EXPORT_VAR.

  I will be happy to revert the inclusion of ap_config.h from 
  httpd.h if this bothers anyone.  More individual modules need
  to be patched if we do so.

  The API_EXPORTs all moved into central storage in the ap_config.h
  header.  Without WIN32 or API_STATIC compile time declarations, 
  these macros remain no-ops.

  This patch also moves the following data from http_main to http_config:

    const char *ap_server_argv0;
    const char *ap_server_root;
    ap_array_header_t *ap_server_pre_read_config;
    ap_array_header_t *ap_server_post_read_config;
    ap_array_header_t *ap_server_config_defines;

  And the following variables had already moved into ap_hooks.c:

    ap_pool_t *g_pHookPool;  (initialized now in http_config)
    int g_bDebugHooks;                   (out of http_config)
    const char *g_szCurrentHookName;     (out of http_config)

  The changes to http_main.c are in preparation for that module to
  move out to a seperate .exe for win32.  Other platforms will be
  unaffected, outside of these changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85309 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 05:28:02 +00:00
Bill Stoddard
4bd0fe1c28 Create new function, ap_lingering_close(), which will explicitly do a lingering close
if USE_SO_LINGER is not defined. Move responsibility for closing connections out
of http_connection.c and into the MPMs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85194 13f79535-47bb-0310-9956-ffa450edef68
2000-05-11 21:17:00 +00:00
Bill Stoddard
f219386809 Exit connection processing normally on a graceful shutdown (which will allow
a lingering close where applicable). Set is_graceful in the winnt MPM.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85193 13f79535-47bb-0310-9956-ffa450edef68
2000-05-11 20:47:21 +00:00
Doug MacEachern
b7f8b9d3df change ap_hook_pre_connection from VOID to RUN_ALL
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85066 13f79535-47bb-0310-9956-ffa450edef68
2000-04-27 23:44:16 +00:00
Doug MacEachern
6644b34387 add AP_ prefix to *HOOK* macros
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85045 13f79535-47bb-0310-9956-ffa450edef68
2000-04-26 07:14:39 +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
07fa5ccd17 Get lingering_close() working again.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84951 13f79535-47bb-0310-9956-ffa450edef68
2000-04-13 00:37:55 +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
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
f8a7fce423 Include ap_config.h before httpd.h, this ensures that AP_USE_HSREGEX is
defined correctly in all C files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84531 13f79535-47bb-0310-9956-ffa450edef68
2000-01-28 18:02:29 +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
Ryan Bloom
370fc31b00 Cleanup the ZZZ comments. Basically these used to mark places where APR
is needed.  It is much easier to do this conversion by hand than by
searching for old comments, so they are going away now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84128 13f79535-47bb-0310-9956-ffa450edef68
1999-11-16 18:32:05 +00:00
Manoj Kasichainula
8c4d317e7f ap_bflush and ap_bclose now return ap_status_t error codes instead of
returning -1 and setting errno.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84040 13f79535-47bb-0310-9956-ffa450edef68
1999-10-26 22:25:02 +00:00
Brian Havard
243005861c Enhancements for APR network_io. Adds separate local/remote access methods for
a socket's port, IP address and sockaddr_in.

Updates for Apache code to use these, allowing the correct IP address of
clients to be logged.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84029 13f79535-47bb-0310-9956-ffa450edef68
1999-10-24 05:59:22 +00:00
Manoj Kasichainula
8d98d62709 Add a connection status table to replace the old function of the
scoreboard. It allows MPMs to implement their own mechanism for the
status table and allows any module to add its own per-connection status
entries.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83982 13f79535-47bb-0310-9956-ffa450edef68
1999-10-13 05:24:16 +00:00
Martin Kraemer
0c7673561b Fix typos
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83969 13f79535-47bb-0310-9956-ffa450edef68
1999-10-11 22:07:29 +00:00
Ryan Bloom
c37f14ddf3 Changed pools to contexts. Tested with prefork and pthread mpm's. I'll
check this out tomorrow and make sure everything was checked in correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83852 13f79535-47bb-0310-9956-ffa450edef68
1999-08-31 05:35:52 +00:00
Ralf S. Engelschall
895541ebc1 Make ``configure --with-option=devel'' under
GCC 2.95.1 happy by avoiding various warnings...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83836 13f79535-47bb-0310-9956-ffa450edef68
1999-08-28 12:22:10 +00:00
Manoj Kasichainula
2ab2189444 Add a connection ID to conn_rec. It uniquely identifies a connection at
any instant in time. It's not very well tested yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83662 13f79535-47bb-0310-9956-ffa450edef68
1999-08-13 06:58:08 +00:00
dgaudet
a0ad84fbe8 merge the differences in apache-1.3 from tag apache-apr-merge-3 up
to mpm-merge-1 onto the mpm tree

prior to the merge, the mpm tree was tagged with apache-1_3-merge-1-pre
and after the merge, the mpm tree will be tagged with apache-1_3-merge-1-post

note: none of htdocs/manual is present in mpm at this point.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83587 13f79535-47bb-0310-9956-ffa450edef68
1999-08-06 00:55:28 +00:00
Manoj Kasichainula
2bc99dc33d Take child_num and thread_num out of conn_rec. They aren't used anywhere
anymore, and conn_rec is the wrong place for them.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83581 13f79535-47bb-0310-9956-ffa450edef68
1999-08-05 19:56:24 +00:00
Ben Laurie
76c762ea56 Break out the hook implementations into three kinds, thus avoiding null macro
arguments. Gates made me do it!


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83546 13f79535-47bb-0310-9956-ffa450edef68
1999-07-31 09:31:21 +00:00
Ben Laurie
ec496cb324 Another hook (I won't be upset if someone else wants to do some!).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83516 13f79535-47bb-0310-9956-ffa450edef68
1999-07-27 21:16:46 +00:00
Ben Laurie
d9297cae25 Actually, we should always close the connection when it is finished.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83488 13f79535-47bb-0310-9956-ffa450edef68
1999-07-23 18:14:44 +00:00