cvs commit: apache-apr/pthreads/src/modules/proxy proxy_cache.c proxy_ftp.c

1999-03-22 Thread rbb
rbb 99/03/22 12:43:41

  Modified:pthreads/src/modules/proxy proxy_cache.c proxy_ftp.c
  Log:
  Amazingly enough, mod_proxy seems to work.  I had to remove all of the
  ap_(un)block_alarms calls, but that should be okay, because our sig_wait
  thread should handle all of that stuff for us.  This needs to be tested
  more thoroughly, but it seemed to work for me.
  
  Revision  ChangesPath
  1.6   +1 -9  apache-apr/pthreads/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- proxy_cache.c 1999/03/17 17:01:42 1.5
  +++ proxy_cache.c 1999/03/22 20:43:39 1.6
  @@ -137,13 +137,11 @@
inside = 1;
   (void) ap_release_mutex(garbage_mutex);
   
  -ap_block_alarms();   /* avoid SIGALRM on big cache cleanup */
   #if !defined(WIN32)  !defined(MPE)  !defined(OS2)
   detached_proxy_garbage_coll(r);
   #else
   help_proxy_garbage_coll(r);
   #endif
  -ap_unblock_alarms();
   
   (void) ap_acquire_mutex(garbage_mutex);
   inside = 0;
  @@ -294,7 +292,6 @@
   if (garbage_now != -1  lastcheck != BAD_DATE  garbage_now  
lastcheck + every)
return;
   
  -ap_block_alarms();   /* avoid SIGALRM on big cache cleanup */
   
   filename = ap_palloc(r-pool, strlen(cachedir) + HASH_LEN + 2);
   strcpy(filename, cachedir);
  @@ -303,7 +300,6 @@
if (errno != ENOENT) {
ap_log_error(APLOG_MARK, APLOG_ERR, r-server,
 proxy: stat(%s), filename);
  - ap_unblock_alarms();
return;
}
if ((timefd = creat(filename, 0666)) == -1) {
  @@ -312,7 +308,6 @@
 proxy: creat(%s), filename);
else
lastcheck = garbage_now;/* someone else got in there */
  - ap_unblock_alarms();
return;
}
close(timefd);
  @@ -320,7 +315,6 @@
   else {
lastcheck = buf.st_mtime;   /* save the time */
if (garbage_now  lastcheck + every) {
  - ap_unblock_alarms();
return;
}
if (utime(filename, NULL) == -1)
  @@ -336,7 +330,6 @@
ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r-server,
 proxy GC: Cache is %ld%% full (nothing deleted),
 
(long)(((curbytes.upper20)|(curbytes.lower10))*100/conf-space));
  - ap_unblock_alarms();
return;
   }
   
  @@ -367,7 +360,6 @@
   ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, r-server,
 proxy GC: Cache is %ld%% full (%d deleted),
 
(long)(((curbytes.upper20)|(curbytes.lower10))*100/conf-space), i);
  -ap_unblock_alarms();
   }
   
   static int sub_garbage_coll(request_rec *r, array_header *files,
  @@ -954,7 +946,7 @@
r-status_line = strchr(c-resp_line, ' ') + 1;
r-status = c-status;
if (!r-assbackwards) {
  - ap_soft_timeout(proxy send headers, r);
  + /*ap_soft_timeout(proxy send headers, r);*/
ap_proxy_send_headers(r, c-resp_line, c-hdrs);
}
ap_bsetopt(r-connection-client, BO_BYTECT, zero);
  
  
  
  1.5   +1 -1  apache-apr/pthreads/src/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- proxy_ftp.c   1999/03/17 17:01:43 1.4
  +++ proxy_ftp.c   1999/03/22 20:43:39 1.5
  @@ -660,7 +660,7 @@
   i = ftp_getrc(f);
   Explain1(FTP: returned status %d, i);
   if (i == -1) {
  - return ap_proxyerror(r, ,HTTP_BAD_GATEWAY,
  + return ap_proxyerror(r, HTTP_BAD_GATEWAY,
Error reading from remote server);
   }
   if (i == 530) {
  
  
  


cvs commit: apache-apr/pthreads/src/modules/proxy proxy_cache.c

1999-01-29 Thread rbb
rbb 99/01/29 07:48:28

  Modified:pthreads/src/modules/proxy proxy_cache.c
  Log:
  Changes to allow mod_proxy to compile for the threaded server.  I haven't
  tested these, but at least it will compile now.  I'll test them after the
  server is a bit more stable.
  
  Revision  ChangesPath
  1.2   +5 -5  apache-apr/pthreads/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- proxy_cache.c 1999/01/21 23:08:35 1.1
  +++ proxy_cache.c 1999/01/29 15:48:28 1.2
  @@ -638,7 +638,7 @@
   if (imstr != NULL) {
   /* this may modify the value in the original table */
imstr = ap_proxy_date_canon(r-pool, imstr);
  - c-ims = ap_parseHTTPdate(imstr);
  + c-ims = ap_parseHTTPdate(imstr, (c-ims));
if (c-ims == BAD_DATE) /* bad or out of range date; remove it */
ap_table_unset(r-headers_in, If-Modified-Since);
   }
  @@ -793,7 +793,7 @@
*/
   expire = ap_table_get(resp_hdrs, Expires);
   if (expire != NULL)
  - expc = ap_parseHTTPdate(expire);
  + expc = ap_parseHTTPdate(expire, expc);
   else
expc = BAD_DATE;
   
  @@ -802,7 +802,7 @@
*/
   lmods = ap_table_get(resp_hdrs, Last-Modified);
   if (lmods != NULL) {
  - lmod = ap_parseHTTPdate(lmods);
  + lmod = ap_parseHTTPdate(lmods, lmod);
if (lmod == BAD_DATE) {
   /* kill last modified date */
lmods = NULL;
  @@ -847,7 +847,7 @@
*/
   dates = ap_table_get(resp_hdrs, Date);
   if (dates != NULL)
  - date = ap_parseHTTPdate(dates);
  + date = ap_parseHTTPdate(dates, date);
   else
date = BAD_DATE;
   
  @@ -881,7 +881,7 @@
   if (expire == NULL  c-fp != NULL) {   /* no expiry data sent in 
response */
expire = ap_table_get(c-hdrs, Expires);
if (expire != NULL)
  - expc = ap_parseHTTPdate(expire);
  + expc = ap_parseHTTPdate(expire, expc);
   }
   /* so we now have the expiry date */
   /* if no expiry date then