cvs commit: apache/src CHANGES mod_include.c

1997-02-19 Thread Marc Slemko
marc97/02/19 00:18:58

  Modified:src   CHANGES mod_include.c
  Log:
  Modify mod_include escaping so a '\' only signifies an escaped
  character if the next character is one that needs escaping.
  
  Reviewed by:  Dean Gaudet, Roy Fielding, Marc Slemko
  Submitted by: Ben Laurie
  
  Revision  ChangesPath
  1.169 +4 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.168
  retrieving revision 1.169
  diff -C3 -r1.168 -r1.169
  *** CHANGES   1997/02/18 14:41:28 1.168
  --- CHANGES   1997/02/19 08:18:56 1.169
  ***
  *** 1,5 
  --- 1,9 
Changes with Apache 1.2b7

  +   *) Modify mod_include escaping so a '\' only signifies an escaped
  +  character if the next character is one that needs
  +  escaping.  [Ben Laurie]
  + 
  *) Eliminated possible infinite loop in mod_imap when relative URLs are
 used with a 'base' directive that does not have a '/' in it.
 [Marc Slemko, reported by Onno Witvliet [EMAIL PROTECTED]]
  
  
  
  1.24  +4 -1  apache/src/mod_include.c
  
  Index: mod_include.c
  ===
  RCS file: /export/home/cvs/apache/src/mod_include.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -C3 -r1.23 -r1.24
  *** mod_include.c 1997/02/17 10:56:19 1.23
  --- mod_include.c 1997/02/19 08:18:56 1.24
  ***
  *** 404,410 
while ((ch = *in++) != '\0') {
switch(ch) {
  case '\\':
  ! *next++ = (*in != '\0') ? *in++ : '\0';
break;
  case '$':
  {
  --- 404,413 
while ((ch = *in++) != '\0') {
switch(ch) {
  case '\\':
  !   if(*in == '$')
  !   *next++=*in++;
  !   else
  !   *next++=ch;
break;
  case '$':
  {
  
  
  


cvs commit: apache/htdocs/manual/mod mod_log_config.html

1997-02-19 Thread Marc Slemko
marc97/02/19 09:46:42

  Modified:htdocs/manual/mod  mod_log_config.html
  Log:
  Add backreference to format for common log module to make it easier
  to find.
  
  Revision  ChangesPath
  1.13  +3 -2  apache/htdocs/manual/mod/mod_log_config.html
  
  Index: mod_log_config.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/mod/mod_log_config.html,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -C3 -r1.12 -r1.13
  *** mod_log_config.html   1997/02/15 22:27:58 1.12
  --- mod_log_config.html   1997/02/19 17:46:41 1.13
  ***
  *** 90,96 
any headers.
/dl

  ! h3Custom Log Formats/h3

The format argument to the codeLogFormat/code and
codeCustomLog/code is a string. This string is logged to the log
  --- 90,96 
any headers.
/dl

  ! A NAME=formatsh3Custom Log Formats/h3/A

The format argument to the codeLogFormat/code and
codeCustomLog/code is a string. This string is logged to the log
  ***
  *** 220,226 
strongStatus:/strong Basebr
strongModule:/strong mod_log_configp

  ! This sets the format of the logfile.phr


A name=transferlogh2TransferLog/h2/A
  --- 220,227 
strongStatus:/strong Basebr
strongModule:/strong mod_log_configp

  ! This sets the format of the logfile.  See A HREF=#formats
  ! Custom Log Formats/A for details on the format arguments.phr


A name=transferlogh2TransferLog/h2/A
  
  
  


cvs commit: apache/support .cvsignore

1997-02-19 Thread Marc Slemko
marc97/02/19 15:35:11

  Modified:support   .cvsignore
  Log:
  Makefile is now automatically generated.
  
  Revision  ChangesPath
  1.4   +1 -0  apache/support/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /export/home/cvs/apache/support/.cvsignore,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -C3 -r1.3 -r1.4
  *** .cvsignore1996/11/17 20:23:17 1.3
  --- .cvsignore1997/02/19 23:35:10 1.4
  ***
  *** 1,3 
  --- 1,4 
  + Makefile
rotatelogs
htpasswd
htdigest
  
  
  


cvs commit: apache/src http_protocol.c

1997-02-19 Thread Alexei Kosut
akosut  97/02/19 17:23:25

  Modified:src   http_protocol.c
  Log:
  Add a check for MSIE 3 to send multipart/x-byteranges instead of byteranges.
  Remove quotes from the boundary string (MSIE has problems with them).
  
  Reviewed by: Paul, Jim, Ben
  
  Revision  ChangesPath
  1.103 +17 -3 apache/src/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /export/home/cvs/apache/src/http_protocol.c,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -C3 -r1.102 -r1.103
  *** http_protocol.c   1997/02/18 14:41:29 1.102
  --- http_protocol.c   1997/02/20 01:23:23 1.103
  ***
  *** 1053,1058 
  --- 1053,1073 
return OK;
}

  + /*
  +  * Here we try to be compatible with clients that want 
multipart/x-byteranges
  +  * instead of multipart/byteranges (also see above), as per HTTP/1.1. We
  +  * look for the Request-Range header (e.g. Netscape 2 and 3) as an 
indication
  +  * that the browser supports an older protocol. We also check User-Agent
  +  * for Microsoft Internet Explorer 3, which needs this as well.
  +  */
  + 
  + static int use_range_x(request_rec *r) {
  + char *ua;
  + return (table_get(r-headers_in, Request-Range) ||
  + ((ua = table_get(r-headers_in, User-Agent))
  +   strstr(ua, MSIE 3)));
  + }
  + 
void send_http_header(request_rec *r)
{
conn_rec *c = r-connection;
  ***
  *** 1083,1091 

if (r-byterange  1)
bvputs(fd, Content-Type: multipart/,
  !table_get(r-headers_in, Request-Range) ?
  !x-byteranges : byteranges,
  !; boundary=\, r-boundary, \\015\012, NULL);
else if (r-content_type)
bvputs(fd, Content-Type: , 
 nuke_mime_parms (r-pool, r-content_type), \015\012, NULL);
  --- 1098,1105 

if (r-byterange  1)
bvputs(fd, Content-Type: multipart/,
  !use_range_x(r) ? x-byteranges : byteranges,
  !; boundary=, r-boundary, \015\012, NULL);
else if (r-content_type)
bvputs(fd, Content-Type: , 
 nuke_mime_parms (r-pool, r-content_type), \015\012, NULL);
  
  
  


cvs commit: apache/src http_main.c

1997-02-19 Thread Marc Slemko
marc97/02/19 19:20:19

  Modified:src   http_main.c
  Log:
  Add code to detect when a child process did not exit properly after
  a HUP and give it a prod.  We do everything we can to make it die,
  since if it doesn't chances are the server won't be able to bind
  to the port on restart.  For some reason, some children were not
  exiting and holding the whole show until they finish processing
  their MaxRequestsPerChild and exit.
  
  Reviewed by:  Randy Terbush, Roy Fielding, Dean Gaudet
  
  Revision  ChangesPath
  1.124 +51 -2 apache/src/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache/src/http_main.c,v
  retrieving revision 1.123
  retrieving revision 1.124
  diff -C3 -r1.123 -r1.124
  *** http_main.c   1997/02/18 08:06:14 1.123
  --- http_main.c   1997/02/20 03:20:18 1.124
  ***
  *** 1030,1037 
for (i = 0; i  HARD_SERVER_LIMIT; ++i) {
int pid = scoreboard_image-servers[i].pid;

  ! if (pid != my_pid  pid != 0)
  ! waitpid (scoreboard_image-servers[i].pid, status, 0);
}
}

  --- 1030,1086 
for (i = 0; i  HARD_SERVER_LIMIT; ++i) {
int pid = scoreboard_image-servers[i].pid;

  ! if (pid != my_pid  pid != 0) { 
  ! int waitret = 0,
  ! tries = 1;
  ! 
  ! while (waitret == 0  tries = 4) {
  ! long int waittime = 4096; /* in usecs */
  ! struct timeval tv;
  ! 
  ! /* don't want to hold up progress any more than 
  !  * necessary, so keep checking to see if the child
  !  * has exited with an exponential backoff.
  !  * Currently set for a maximum wait of a bit over
  !  * four seconds.
  !  */
  ! while (((waitret = waitpid(pid, status, WNOHANG)) == 0) 
  !  waittime  300) {
  !tv.tv_sec = waittime / 100;
  !tv.tv_usec = waittime % 100;
  !waittime = waittime * 2;
  !select(0, NULL, NULL, NULL, tv);
  ! }
  ! if (waitret == 0) {
  ! switch (tries) {
  ! case 1:
  ! /* perhaps it missed the SIGHUP, lets try again */
  ! log_printf(server_conf, child process %d did not exit, 
sending another SIGHUP, pid);
  ! kill(pid, SIGHUP);
  ! break;
  ! case 2:
  ! /* ok, now it's being annoying */
  ! log_printf(server_conf, child process %d still did not 
exit, sending a SIGTERM, pid);
  ! kill(pid, SIGTERM);
  ! break;
  ! case 3:
  ! /* die child scum */
  ! log_printf(server_conf, child process %d still did not 
exit, sending a SIGKILL, pid);
  ! kill(pid, SIGKILL);
  ! break;
  ! case 4:
  ! /* gave it our best shot, but alas...  If this really 
  !  * is a child we are trying to kill and it really hasn't
  !  * exited, we will likely fail to bind to the port
  !  * after the restart.
  !  */
  ! log_printf(server_conf, could not make child process 
%d exit, attempting to continue anyway, pid);
  ! break;
  ! }
  ! }
  ! tries++;
  ! }
  ! }
}
}

  
  
  


cvs commit: apache/src CHANGES

1997-02-19 Thread Alexei Kosut
akosut  97/02/19 19:37:38

  Modified:src   CHANGES
  Log:
  Add MSIE/byterange to CHANGES
  
  Revision  ChangesPath
  1.170 +3 -2  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.169
  retrieving revision 1.170
  diff -C3 -r1.169 -r1.170
  *** CHANGES   1997/02/19 08:18:56 1.169
  --- CHANGES   1997/02/20 03:37:37 1.170
  ***
  *** 79,86 
  *) Remove free() from clean_env() in suexec wrapper. This was nuking
 the clean environment on some systems.

  !   *) Tweak byteserving code (e.g. serving PDF files) to work around a 
  !  bug in Netscape Navigator. [Alexei Kosut]

  *) Port to HP MPE operating system for HP 3000 machines
 [Mark Bixby [EMAIL PROTECTED]]
  --- 79,87 
  *) Remove free() from clean_env() in suexec wrapper. This was nuking
 the clean environment on some systems.

  !   *) Tweak byteserving code (e.g. serving PDF files) to work around
  !  bugs in Netscape Navigator and Microsoft Internet Explorer.
  !  [Alexei Kosut]

  *) Port to HP MPE operating system for HP 3000 machines
 [Mark Bixby [EMAIL PROTECTED]]
  
  
  


cvs commit: apache/src/modules/proxy proxy_ftp.c

1997-02-19 Thread Chuck Murcko
chuck   97/02/19 20:14:45

  Modified:src/modules/proxy  proxy_ftp.c
  Log:
  1) remove setting of SO_DEBUG socket option to make Linux users happy.
  2) Make ftp_getrc() more lenient about multiline responses (specifically,
 230 responses which don't have continuation 230- on each line). These
 seem to be all NT FTP servers, and while they may be the mutant spawn of
 the devil, they appear to be legal by RFC 959.
  3) Add missing kill_timeout() after transfer to user completes. This coupled
 with 2) is very likely the cause of Rasmus' timeout problem.
  
  Revision  ChangesPath
  1.9   +6 -15 apache/src/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===
  RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -C3 -r1.8 -r1.9
  *** proxy_ftp.c   1997/01/20 04:28:33 1.8
  --- proxy_ftp.c   1997/02/20 04:14:44 1.9
  ***
  *** 185,197 
/* check format */
if (len  5 || !isdigit(linebuff[0]) || !isdigit(linebuff[1]) ||
!isdigit(linebuff[2]) || (linebuff[3] != ' '  linebuff[3] != '-'))
  ! return 0;
  ! status = 100 * linebuff[0] + 10 * linebuff[1] + linebuff[2] - 111 * '0';

if (linebuff[len-1] != '\n')
{
i = bskiplf(f);
  - if (i != 1) return i;
}

/* skip continuation lines */
  --- 185,199 
/* check format */
if (len  5 || !isdigit(linebuff[0]) || !isdigit(linebuff[1]) ||
!isdigit(linebuff[2]) || (linebuff[3] != ' '  linebuff[3] != '-'))
  ! status = 0;
  ! else
  ! status = 100 * linebuff[0] + 10 * linebuff[1] + linebuff[2] - 111 * '0';
  ! 
  ! Explain1(FTP: ftp_getrc() status = %d, status);

if (linebuff[len-1] != '\n')
{
i = bskiplf(f);
}

/* skip continuation lines */
  ***
  *** 203,213 
{
len = bgets(linebuff, 100, f);
if (len == -1) return -1;
  - if (len  5) return 0;
if (linebuff[len-1] != '\n')
{
i = bskiplf(f);
  - if (i != 1) return i;
}
} while (memcmp(linebuff, buff, 4) != 0);
}
  --- 205,213 
  ***
  *** 564,579 
}
note_cleanups_for_fd(pool, dsock);

  - if (setsockopt(dsock, SOL_SOCKET, SO_DEBUG, (const char *)one,
  -   sizeof (int)) == -1)
  - {
  - proxy_log_uerror(setsockopt, NULL,
  - proxy: error setting PASV debug option, r-server);
  - pclosef(pool, dsock);
  - pclosef(pool, sock);
  - return SERVER_ERROR;
  - }
  - 
bputs(PASV\015\012, f);
bflush(f);
Explain0(FTP: PASV command issued);
  --- 564,569 
  ***
  *** 867,872 
  --- 857,863 
Explain1(FTP: returned status %d,i);
}

  + kill_timeout(r);
proxy_cache_tidy(c);

/* finish */
  
  
  


cvs commit: apache/src CHANGES

1997-02-19 Thread Chuck Murcko
chuck   97/02/19 20:21:37

  Modified:src   CHANGES
  Log:
  updates for proxy FTP.
  
  Revision  ChangesPath
  1.172 +9 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.171
  retrieving revision 1.172
  diff -C3 -r1.171 -r1.172
  *** CHANGES   1997/02/20 04:13:16 1.171
  --- CHANGES   1997/02/20 04:21:35 1.172
  ***
  *** 1,5 
  --- 1,14 
Changes with Apache 1.2b7

  +   *) more proxy FTP bug fixes:
  +  - remove setting of SO_DEBUG socket option
  +  - Make ftp_getrc() more lenient about multiline responses,
  +specifically, 230 responses which don't have continuation 230-
  +on each line). These seem to be all NT FTP servers, and while
  +perhaps questionable, they appear to be legal by RFC 959.
  +  - Add missing kill_timeout() after transfer to user completes.
  +  [Chuck Murcko]
  + 
  *) Fixed problem where a busy server could hang when restarting
 after being sent a SIGHUP due to child processes not exiting.
 [Marc Slemko]
  
  
  


cvs commit: apache/htdocs/manual/mod mod_proxy.html

1997-02-19 Thread Chuck Murcko
chuck   97/02/19 20:26:08

  Modified:htdocs/manual/mod  mod_proxy.html
  Log:
  Fix typo; add section about SOCKS 4.2/Solaris problems.
  
  Revision  ChangesPath
  1.13  +4 -1  apache/htdocs/manual/mod/mod_proxy.html
  
  Index: mod_proxy.html
  ===
  RCS file: /export/home/cvs/apache/htdocs/manual/mod/mod_proxy.html,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -C3 -r1.12 -r1.13
  *** mod_proxy.html1997/01/09 07:29:12 1.12
  --- mod_proxy.html1997/02/20 04:26:07 1.13
  ***
  *** 312,320 
Yes. Just build Apache with the rule codeSOCKS4=yes/code in your
iConfiguration/i file, and follow the instructions there. SOCKS5 
capability can be added in a similar way (there's no codeSOCKS5/code
  ! rule yet, so use the codeEXTRA_LFLAGS/code definition, or build Apache
normally and run it with the irunsocks/i wrapper provided with SOCKS5,
if your OS supports dynamically linked libraries.p

Remember that you'll also have to grant access to your Apache proxy machine 
by
permitting connections on the appropriate ports in your SOCKS daemon's
  --- 312,323 
Yes. Just build Apache with the rule codeSOCKS4=yes/code in your
iConfiguration/i file, and follow the instructions there. SOCKS5 
capability can be added in a similar way (there's no codeSOCKS5/code
  ! rule yet), so use the codeEXTRA_LFLAGS/code definition, or build Apache
normally and run it with the irunsocks/i wrapper provided with SOCKS5,
if your OS supports dynamically linked libraries.p
  + 
  + Some users have reported problems when using SOCKS version 4.2 on Solaris.
  + The problem was solved by upgrading to SOCKS 4.3.p

Remember that you'll also have to grant access to your Apache proxy machine 
by
permitting connections on the appropriate ports in your SOCKS daemon's
  
  
  


cvs commit: apache/src/modules/proxy proxy_http.c

1997-02-19 Thread Chuck Murcko
chuck   97/02/19 21:16:26

  Modified:src/modules/proxy  proxy_http.c
  Log:
  Changed HTTP status check mask from HTTP/#.# ### * to HTTP/#.# ###*
  to be more lenient about servers which don't return all of a legal HTTP/1.x
  status.
  
  Revision  ChangesPath
  1.14  +1 -1  apache/src/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===
  RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_http.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -C3 -r1.13 -r1.14
  *** proxy_http.c  1997/01/20 04:28:33 1.13
  --- proxy_http.c  1997/02/20 05:16:25 1.14
  ***
  *** 276,282 
}

/* Is it an HTTP/1 response? */
  ! if (checkmask(buffer,  HTTP/#.# ### *))
{
/* If not an HTTP/1 messsage or if the status line was  8192 bytes */
if (buffer[5] != '1' || buffer[len-1] != '\n')
  --- 276,282 
}

/* Is it an HTTP/1 response? */
  ! if (checkmask(buffer,  HTTP/#.# ###*))
{
/* If not an HTTP/1 messsage or if the status line was  8192 bytes */
if (buffer[5] != '1' || buffer[len-1] != '\n')
  
  
  


cvs commit: apache/src CHANGES

1997-02-19 Thread Chuck Murcko
chuck   97/02/19 21:19:50

  Modified:src   CHANGES
  Log:
  Note HTTP status mask change for mod_proxy.
  
  Revision  ChangesPath
  1.173 +4 -0  apache/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.172
  retrieving revision 1.173
  diff -C3 -r1.172 -r1.173
  *** CHANGES   1997/02/20 04:21:35 1.172
  --- CHANGES   1997/02/20 05:19:48 1.173
  ***
  *** 1,5 
  --- 1,9 
Changes with Apache 1.2b7

  +   *) changed status check mask in proxy_http.c from HTTP/#.# ### * to
  +  HTTP/#.# ###* to be more lenient about what we accept.
  +  [Chuck Murcko]
  + 
  *) more proxy FTP bug fixes:
 - remove setting of SO_DEBUG socket option
 - Make ftp_getrc() more lenient about multiline responses,