cvs commit: apachen/src CHANGES

1997-11-25 Thread martin
martin  97/11/25 14:00:41

  Modified:src  CHANGES
  Log:
  Document proxy_ftp changes
  
  Revision  ChangesPath
  1.522 +6 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.521
  retrieving revision 1.522
  diff -u -u -r1.521 -r1.522
  --- CHANGES   1997/11/25 21:36:51 1.521
  +++ CHANGES   1997/11/25 22:00:40 1.522
  @@ -1,5 +1,11 @@
   Changes with Apache 1.3b4
   
  +  *) proxy_ftp: the directory listings generated by the proxy ftp module
  + now have a title in which the path components are clickable and allow
  + quick navigation to the clicked-on directory on the currently listed
  + ftp server. This also fixes a bug where the ".." directory links would
  + sometimes refer to the wrong directory.  [Martin Kraemer]
  +
 *) WIN32: Allocate the correct amount of memory for the scoreboard.
[Ben Hyde] PR#1387
   
  
  
  


cvs commit: apachen/src CHANGES

1997-11-25 Thread dgaudet
dgaudet 97/11/25 13:36:52

  Modified:src  CHANGES
  Log:
  attribute the PR#1387 fix to Ben Hyde
  
  Revision  ChangesPath
  1.521 +1 -1  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.520
  retrieving revision 1.521
  diff -u -r1.520 -r1.521
  --- CHANGES   1997/11/25 20:43:30 1.520
  +++ CHANGES   1997/11/25 21:36:51 1.521
  @@ -1,7 +1,7 @@
   Changes with Apache 1.3b4
   
 *) WIN32: Allocate the correct amount of memory for the scoreboard.
  - [Dean Gaudet]
  + [Ben Hyde] PR#1387
   
 *) WIN32: Only lowercase the part of the path that is real. [Ben Laurie]
   
  
  
  


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

1997-11-25 Thread martin
martin  97/11/25 13:34:13

  Modified:src/modules/proxy proxy_ftp.c
  Log:
  Fix for the buggy behavior of proxy_ftp.c which would return incorrect links
  for ".." directory entries , depending on the fact whether the request
  contained a trailing slash or not.
  
  Also add a small "feature": the full directory path broken down into separate
  clickable path components which makes traversal of public ftp servers much
  easier.
  
  Future improvements in this area include:
  0) add appropriate cache control headers to prevent caches from keeping
 sensitive documents (user:password@)
  1) make clickable header optional ("ProxyOptions +ClickHeader"
  2) return an external redirection if proxy_ftp detects a directory but the
 request did not contain a trailing slash (that would make the current BASE
 HREF= header field obsolete which in turn would allow the removal of the
 last occurrence of the "user:password@" prefix from the generated 
document).
  3) return a 401 authenticate reply if the addressed ftp server requires a
 user name (other than "anonymous") or a password (other than "apache@"),
 unless the request contained a WWW-Authenticate: header already.
  4) Optionally convert requests ftp://user:[EMAIL PROTECTED]/ on-the-fly into
 requests of the form ftp://host/ plus the appropriate WWW-Authenticate:
 header when forwarding to an upstream proxy, lessening the danger of
 publishing passwords thru use of log file analyzers.
  
  Reviewed by:  Ken Coar, Roy T. Fielding
  
  Revision  ChangesPath
  1.42  +96 -67apachen/src/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===
  RCS file: /home/cvs/apachen/src/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -u -r1.41 -r1.42
  --- proxy_ftp.c   1997/10/22 20:30:07 1.41
  +++ proxy_ftp.c   1997/11/25 21:34:12 1.42
  @@ -114,11 +114,11 @@
   port = DEFAULT_FTP_PORT;
   err = proxy_canon_netloc(p, &url, &user, &password, &host, &port);
   if (err)
  - return BAD_REQUEST;
  + return HTTP_BAD_REQUEST;
   if (user != NULL && !ftp_check_string(user))
  - return BAD_REQUEST;
  + return HTTP_BAD_REQUEST;
   if (password != NULL && !ftp_check_string(password))
  - return BAD_REQUEST;
  + return HTTP_BAD_REQUEST;
   
   /* now parse path/parameters args, according to rfc1738 */
   /* N.B. if this isn't a true proxy request, then the URL path
  @@ -131,28 +131,28 @@
*(strp++) = '\0';
parms = proxy_canonenc(p, strp, strlen(strp), enc_parm, r->proxyreq);
if (parms == NULL)
  - return BAD_REQUEST;
  + return HTTP_BAD_REQUEST;
   }
   else
parms = "";
   
   path = proxy_canonenc(p, url, strlen(url), enc_path, r->proxyreq);
   if (path == NULL)
  - return BAD_REQUEST;
  + return HTTP_BAD_REQUEST;
   if (!ftp_check_string(path))
  - return BAD_REQUEST;
  + return HTTP_BAD_REQUEST;
   
   if (!r->proxyreq && r->args != NULL) {
if (strp != NULL) {
strp = proxy_canonenc(p, r->args, strlen(r->args), enc_parm, 1);
if (strp == NULL)
  - return BAD_REQUEST;
  + return HTTP_BAD_REQUEST;
parms = pstrcat(p, parms, "?", strp, NULL);
}
else {
strp = proxy_canonenc(p, r->args, strlen(r->args), enc_fpath, 1);
if (strp == NULL)
  - return BAD_REQUEST;
  + return HTTP_BAD_REQUEST;
path = pstrcat(p, path, "?", strp, NULL);
}
r->args = NULL;
  @@ -180,7 +180,7 @@
*/
   static int ftp_getrc(BUFF *f)
   {
  -int i, len, status;
  +int len, status;
   char linebuff[100], buff[5];
   
   len = bgets(linebuff, 100, f);
  @@ -194,7 +194,7 @@
status = 100 * linebuff[0] + 10 * linebuff[1] + linebuff[2] - 111 * '0';
   
   if (linebuff[len - 1] != '\n') {
  - i = bskiplf(f);
  + (void)bskiplf(f);
   }
   
   /* skip continuation lines */
  @@ -206,7 +206,7 @@
if (len == -1)
return -1;
if (linebuff[len - 1] != '\n') {
  - i = bskiplf(f);
  + (void)bskiplf(f);
}
} while (memcmp(linebuff, buff, 4) != 0);
   }
  @@ -240,27 +240,91 @@
   char buf2[IOBUFSIZE];
   char *filename;
   char *tempurl;
  -char *newurlptr;
   int searchidx = 0;
   char *searchptr = NULL;
   int firstfile = 1;
   char urlptr[HUGE_STRING_LEN];
  -long total_bytes_sent;
  +unsigned long total_bytes_sent = 0;
   register int n, o, w;
  +int hostlen;
   conn_rec *con = r->connection;
  +char *dir, *path, *reldir, *site, *psite;
   
   tempurl = pstrdup(r->pool, url);
  -if ((n = strcspn(tempurl, "@")) != strlen(tempurl)) {/* hide 
user/passwd */
  +
  +(void)decode

cvs commit: apachen/src/main http_main.c

1997-11-25 Thread ben
ben 97/11/25 12:43:34

  Modified:src  CHANGES
   src/main http_main.c
  Log:
  Fix scoreboard allocation size.
  Submitted by: Dean Gaudet
  
  Revision  ChangesPath
  1.520 +3 -0  apachen/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.519
  retrieving revision 1.520
  diff -u -r1.519 -r1.520
  --- CHANGES   1997/11/23 18:10:02 1.519
  +++ CHANGES   1997/11/25 20:43:30 1.520
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b4
   
  +  *) WIN32: Allocate the correct amount of memory for the scoreboard.
  + [Dean Gaudet]
  +
 *) WIN32: Only lowercase the part of the path that is real. [Ben Laurie]
   
 *) Fix problems with timeouts in inetd mode and -X mode.  [Dean Gaudet]
  
  
  
  1.255 +2 -1  apachen/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.254
  retrieving revision 1.255
  diff -u -r1.254 -r1.255
  --- http_main.c   1997/11/25 04:07:11 1.254
  +++ http_main.c   1997/11/25 20:43:32 1.255
  @@ -1248,7 +1248,8 @@
   void reinit_scoreboard(pool *p)
   {
   ap_assert(!scoreboard_image);
  -scoreboard_image = (scoreboard *) calloc(HARD_SERVER_LIMIT, 
sizeof(short_score));
  +scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE);
  +memset(scoreboard_image, 0, SCOREBOARD_SIZE);
   }
   
   void cleanup_scoreboard()
  
  
  


cvs commit: apachen/htdocs/manual install.html

1997-11-25 Thread pcs
pcs 97/11/25 01:47:48

  Modified:.README
   htdocs/manual install.html
  Log:
  Fix the default Apache path
  
  Revision  ChangesPath
  1.14  +1 -1  apachen/README
  
  Index: README
  ===
  RCS file: /export/home/cvs/apachen/README,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- README1997/11/25 09:41:44 1.13
  +++ README1997/11/25 09:47:47 1.14
  @@ -53,7 +53,7 @@
   Finally, make a call to httpd, with a -f to the full path to the
   httpd.conf file.  I.e., the common case:
   
  -  /usr/local/apache/src/httpd -f /usr/local/apache/conf/httpd.conf
  +  /usr/local/apache/httpd -f /usr/local/apache/conf/httpd.conf
   
   And voila!  The server should be running.
   
  
  
  
  1.17  +1 -1  apachen/htdocs/manual/install.html
  
  Index: install.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/install.html,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- install.html  1997/11/25 09:41:46 1.16
  +++ install.html  1997/11/25 09:47:47 1.17
  @@ -169,7 +169,7 @@
   location with the -f argument. For example:
   
   
  -/usr/local/apache/src/httpd -f /usr/local/apache/conf/httpd.conf
  +/usr/local/apache/httpd -f /usr/local/apache/conf/httpd.conf
   
   
   If all goes well this will return to the command prompt almost
  
  
  


cvs commit: apachen/htdocs/manual install.html

1997-11-25 Thread pcs
pcs 97/11/25 01:41:46

  Modified:.README
   htdocs/manual install.html
  Log:
  
  
  Revision  ChangesPath
  1.13  +1 -1  apachen/README
  
  Index: README
  ===
  RCS file: /export/home/cvs/apachen/README,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- README1997/10/19 17:05:04 1.12
  +++ README1997/11/25 09:41:44 1.13
  @@ -53,7 +53,7 @@
   Finally, make a call to httpd, with a -f to the full path to the
   httpd.conf file.  I.e., the common case:
   
  -  /usr/local/etc/apache/src/httpd -f /usr/local/etc/apache/conf/httpd.conf
  +  /usr/local/apache/src/httpd -f /usr/local/apache/conf/httpd.conf
   
   And voila!  The server should be running.
   
  
  
  
  1.16  +2 -2  apachen/htdocs/manual/install.html
  
  Index: install.html
  ===
  RCS file: /export/home/cvs/apachen/htdocs/manual/install.html,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- install.html  1997/10/25 22:35:07 1.15
  +++ install.html  1997/11/25 09:41:46 1.16
  @@ -169,7 +169,7 @@
   location with the -f argument. For example:
   
   
  -/usr/local/etc/apache/src/httpd -f /usr/local/etc/apache/conf/httpd.conf
  +/usr/local/apache/src/httpd -f /usr/local/apache/conf/httpd.conf
   
   
   If all goes well this will return to the command prompt almost
  @@ -228,7 +228,7 @@
   the parent.  A typical command to stop the server is:
   
   
  -kill -TERM `cat /usr/local/etc/apache/logs/httpd.pid`
  +kill -TERM `cat /usr/local/apache/logs/httpd.pid`
   
   
   
  
  
  


cvs commit: apachen/src/os/win32 main_win32.c

1997-11-25 Thread akosut
akosut  97/11/24 20:07:13

  Modified:src  Apache.dsp Apache.mak
   src/main http_main.c
  Added:   src/os/win32 main_win32.c
  Removed: src/main dummy.c
  Log:
  Move the Win32 main() function out of ApacheCore.dll. Replace it
  with an apache_main(), which is called by a main() function in
  os/win32/main_win32.c.
  
  Reviewed by: Ben Laurie
  
  Revision  ChangesPath
  1.7   +1 -1  apachen/src/Apache.dsp
  
  Index: Apache.dsp
  ===
  RCS file: /export/home/cvs/apachen/src/Apache.dsp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -u -r1.6 -r1.7
  --- Apache.dsp1997/10/20 20:19:07 1.6
  +++ Apache.dsp1997/11/25 04:07:09 1.7
  @@ -86,7 +86,7 @@
   # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
   # Begin Source File
   
  -SOURCE=.\main\dummy.c
  +SOURCE=.\os\win32\main_win32.c
   # End Source File
   # End Group
   # Begin Group "Header Files"
  
  
  
  1.7   +6 -6  apachen/src/Apache.mak
  
  Index: Apache.mak
  ===
  RCS file: /export/home/cvs/apachen/src/Apache.mak,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -u -r1.6 -r1.7
  --- Apache.mak1997/10/20 20:19:08 1.6
  +++ Apache.mak1997/11/25 04:07:09 1.7
  @@ -47,7 +47,7 @@
   !ENDIF 
   
   CLEAN :
  - [EMAIL PROTECTED] "$(INTDIR)\dummy.obj"
  + [EMAIL PROTECTED] "$(INTDIR)\main_win32.obj"
[EMAIL PROTECTED] "$(INTDIR)\vc50.idb"
[EMAIL PROTECTED] "$(OUTDIR)\Apache.exe"
   
  @@ -68,7 +68,7 @@
/incremental:no /pdb:"$(OUTDIR)\Apache.pdb" /machine:I386\
/out:"$(OUTDIR)\Apache.exe" 
   LINK32_OBJS= \
  - "$(INTDIR)\dummy.obj"
  + "$(INTDIR)\main_win32.obj"
   
   "$(OUTDIR)\Apache.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
   $(LINK32) @<<
  @@ -94,7 +94,7 @@
   !ENDIF 
   
   CLEAN :
  - [EMAIL PROTECTED] "$(INTDIR)\dummy.obj"
  + [EMAIL PROTECTED] "$(INTDIR)\main_win32.obj"
[EMAIL PROTECTED] "$(INTDIR)\vc50.idb"
[EMAIL PROTECTED] "$(INTDIR)\vc50.pdb"
[EMAIL PROTECTED] "$(OUTDIR)\Apache.exe"
  @@ -118,7 +118,7 @@
/incremental:yes /pdb:"$(OUTDIR)\Apache.pdb" /debug /machine:I386\
/out:"$(OUTDIR)\Apache.exe" 
   LINK32_OBJS= \
  - "$(INTDIR)\dummy.obj"
  + "$(INTDIR)\main_win32.obj"
   
   "$(OUTDIR)\Apache.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
   $(LINK32) @<<
  @@ -159,9 +159,9 @@
   
   
   !IF "$(CFG)" == "Apache - Win32 Release" || "$(CFG)" == "Apache - Win32 
Debug"
  -SOURCE=.\main\dummy.c
  +SOURCE=.\os\win32\main_win32.c
   
  -"$(INTDIR)\dummy.obj" : $(SOURCE) "$(INTDIR)"
  +"$(INTDIR)\main_win32.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
   
   
  
  
  
  1.254 +5 -1  apachen/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.253
  retrieving revision 1.254
  diff -u -u -r1.253 -r1.254
  --- http_main.c   1997/11/22 02:04:44 1.253
  +++ http_main.c   1997/11/25 04:07:11 1.254
  @@ -4264,8 +4264,12 @@
   return (0);
   }
   
  +#ifdef WIN32
   __declspec(dllexport)
  - int main(int argc, char *argv[])
  + int apache_main(int argc, char *argv[])
  +#else
  +int main(int argc, char *argv[]) 
  +#endif
   {
   int c;
   int child = 0;
  
  
  
  1.1  apachen/src/os/win32/main_win32.c
  
  Index: main_win32.c
  ===
  /* main_win32.c - Apache executable stub file for Win32
   * This file's purpose in life is to load, and call the
   * "real" main function, apache_main(), located in ApacheCore.dll
   *
   * This was done because having the main() function in a DLL,
   * although Win32 allows it, seemed wrong. Also, MSVC++ won't
   * link an executable without at least one object file. This
   * satistifies that requirement.
   */
  
  __declspec(dllexport) int apache_main(int argc, char *argv[]);
  
  int main(int argc, char *argv[]) 
  {
  apache_main(argc, argv);
  }