]> git.pld-linux.org Git - packages/apache1.git/blob - apache1-lingerd.patch
rel 15; builds
[packages/apache1.git] / apache1-lingerd.patch
1
2 # This is a patch to make lingerd work with Apache and mod_ssl together.
3 #
4 # Installation instructions:
5 #
6 #  1) untar apache, mod_ssl and lingerd
7 #
8 #  2) install mod_ssl, per the instructions in mod_ssl_2.x/INSTALL,
9 #  using "the flexible APACI-only way", which copies files over into
10 #  apache's source tree, but doesn't compile Apache just yet.
11 #
12 #  3) install lingerd per the instructions in lingerd-0.9x/INSTALL.
13 #  when patching the Apache source, use aplinger-ssl.diff (this file)
14 #  instead of the regular apache-1.3/aplinger.diff.
15 #
16
17 --- apache_1.3.39/src/main/Makefile.tmpl.org    Sat Dec  2 16:09:32 2000
18 +++ apache_1.3.39/src/main/Makefile.tmpl        Sat Dec  2 16:23:34 2000
19 @@ -5,13 +5,13 @@
20  LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
21  
22  LIB=  libmain.a
23 -HEADERS= test_char.h uri_delims.h 
24 +HEADERS= test_char.h uri_delims.h li_config.h
25  
26  OBJS= alloc.o buff.o \
27        http_config.o http_core.o http_log.o \
28        http_main.o http_protocol.o http_request.o http_vhost.o \
29        util.o util_date.o util_script.o util_uri.o util_md5.o \
30 -      rfc1413.o
31 +      rfc1413.o ap_lingerd.o
32  
33  .c.o:
34         $(CC) -c $(INCLUDES) $(CFLAGS) $<
35 --- apache_1.3.39/src/main/http_main.c~ 2007-10-23 01:51:50.000000000 +0300
36 +++ apache_1.3.39/src/main/http_main.c  2007-10-23 01:52:32.306586698 +0300
37 @@ -102,6 +102,8 @@
38  #include "http_vhost.h"
39  #include "util_script.h"       /* to force util_script.c linking */
40  #include "util_uri.h"
41 +#define  IN_APACHE
42 +#include "li_config.h"
43  #include "scoreboard.h"
44  #include "multithread.h"
45  #include <sys/stat.h>
46 @@ -1575,6 +1576,19 @@
47         return;
48      }
49  
50 +    /* 
51 +     * Try to feed the socket to the linger daemon.  If it fails and
52 +     * we're configured to do so, do a lingering close anyway.
53 +     * Otherwise just close the socket; lingerd will linger on its copy
54 +     * of it.
55 +     */
56 +
57 +    if (lingerd_sendfd(lsd) == 0 || !(LINGER_ON_FAILURE)) {
58 +      ap_bclose(r->connection->client);
59 +      ap_kill_timeout(r);
60 +      return;
61 +    }
62 +
63      /* Set up to wait for readable data on socket... */
64  
65      FD_ZERO(&lfds);
66 @@ -4484,6 +4484,8 @@
67      ap_server_config_defines   = ap_make_array(pcommands, 1, sizeof(char *));
68      pid_table                  = ap_make_table(pglobal, HARD_SERVER_LIMIT);
69  
70 +    lingerd_connect();
71 +
72  #ifdef EAPI
73      ap_hook_init();
74      ap_hook_configure("ap::buff::read", 
This page took 0.118173 seconds and 3 git commands to generate.