You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@locus.apache.org on 2000/07/25 02:58:23 UTC

cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c registry.c service.c

wrowe       00/07/24 17:58:23

  Modified:    src/os/win32 mod_isapi.c util_win32.c
               src/modules/standard mod_so.c mod_auth_digest.c
                        mod_cern_meta.c mod_expires.c mod_file_cache.c
                        mod_rewrite.c mod_speling.c mod_usertrack.c
               src/modules/mpm/winnt mpm_winnt.c registry.c service.c
  Log:
    Missing apr_strings.h - hope this wasn't destined for some global header.
  
  Revision  Changes    Path
  1.13      +142 -77   apache-2.0/src/os/win32/mod_isapi.c
  
  Index: mod_isapi.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/win32/mod_isapi.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- mod_isapi.c	2000/06/24 17:34:11	1.12
  +++ mod_isapi.c	2000/07/25 00:58:20	1.13
  @@ -84,7 +84,9 @@
   #include "http_log.h"
   #include "util_script.h"
   #include "apr_portable.h"
  +#include "apr_strings.h"
   
  +
   /* We use the exact same header file as the original */
   #include <HttpExt.h>
   
  @@ -211,11 +213,16 @@
       ecb->dwVersion = MAKELONG(0, 2);
       ecb->dwHttpStatusCode = 0;
       strcpy(ecb->lpszLogData, "");
  -    ecb->lpszMethod = r->method;
  -    ecb->lpszQueryString = ap_table_get(e, "QUERY_STRING");
  -    ecb->lpszPathInfo = ap_table_get(e, "PATH_INFO");
  -    ecb->lpszPathTranslated = ap_table_get(e, "PATH_TRANSLATED");
  -    ecb->lpszContentType = ap_table_get(e, "CONTENT_TYPE");
  +    // TODO: is a copy needed here?
  +    ecb->lpszMethod = (char*) r->method;
  +    // TODO: is a copy needed here?
  +    ecb->lpszQueryString = (char*) ap_table_get(e, "QUERY_STRING");
  +    // TODO: is a copy needed here?
  +    ecb->lpszPathInfo = (char*) ap_table_get(e, "PATH_INFO");
  +    // TODO: is a copy needed here?
  +    ecb->lpszPathTranslated = (char*) ap_table_get(e, "PATH_TRANSLATED");
  +    // TODO: is a copy needed here?
  +    ecb->lpszContentType = (char*) ap_table_get(e, "CONTENT_TYPE");
   
       /* Set up client input */
       if ((retval = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR))) {
  @@ -290,8 +297,15 @@
           FreeLibrary(isapi_handle);
   
       switch(retval) {
  -    case HSE_STATUS_SUCCESS:
  -    case HSE_STATUS_SUCCESS_AND_KEEP_CONN:
  +        case HSE_STATUS_SUCCESS:
  +            /* TODO: If content length was missing or incorrect, and the response
  +             * was not chunked, we need to close the connection here.
  +             * If the response was chunked, and no closing chunk was sent, we aught
  +             * to transmit one here
  +             */
  +
  +            /* fall through... */
  +        case HSE_STATUS_SUCCESS_AND_KEEP_CONN:
               /* Ignore the keepalive stuff; Apache handles it just fine without
                * the ISA's "advice".
                */
  @@ -301,14 +315,24 @@
   
               return OK;
   
  -    case HSE_STATUS_PENDING:    /* We don't support this */
  -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, APR_ENOTIMPL, r,
  -                      "ISAPI asynchronous I/O not supported: %s", r->filename);
  -        /* fallthrough */
  -    case HSE_STATUS_ERROR:
  -    default:
  +        case HSE_STATUS_PENDING:    
  +            /* We don't support this, but we need to... we should simply create a
  +             * wait event and die on timeout or resume with the callback to our
  +             * ServerSupportFunction with HSE_REQ_DONE_WITH_SESSION to emulate
  +             * async behavior.
  +             */
  +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, APR_ENOTIMPL, r,
  +                          "ISAPI asynchronous I/O not supported: %s", r->filename);
   
  -        return HTTP_INTERNAL_SERVER_ERROR;
  +        case HSE_STATUS_ERROR:    
  +            /* end response if we have yet to do so.
  +             */
  +            return HTTP_INTERNAL_SERVER_ERROR;
  +
  +        default:
  +            /* TODO: log unrecognized retval for debugging 
  +             */
  +            return HTTP_INTERNAL_SERVER_ERROR;
       }
   
   }
  @@ -385,7 +409,9 @@
   
   BOOL WINAPI ReadClient (HCONN ConnID, LPVOID lpvBuffer, LPDWORD lpdwSize)
   {
  -    /* Doesn't need to do anything; we've read all the data already */
  +    /* If the request was a huge transmit or chunked, continue piping the
  +     * request here, but if it's of a sane size, continue to ...
  +     */
       return TRUE;
   }
   
  @@ -399,35 +425,51 @@
       char *data;
   
       switch (dwHSERequest) {
  -    case HSE_REQ_SEND_URL_REDIRECT_RESP:
  -        /* Set the status to be returned when the HttpExtensionProc()
  -         * is done.
  -         */
  -        ap_table_set (r->headers_out, "Location", lpvBuffer);
  -        cid->status = cid->r->status = cid->ecb->dwHttpStatusCode =
  -            HTTP_MOVED_TEMPORARILY;
  -        return TRUE;
  +        case HSE_REQ_SEND_URL_REDIRECT_RESP:
  +            /* Set the status to be returned when the HttpExtensionProc()
  +             * is done.
  +             */
  +            ap_table_set (r->headers_out, "Location", lpvBuffer);
  +            cid->status = cid->r->status = cid->ecb->dwHttpStatusCode =
  +                HTTP_MOVED_TEMPORARILY;
  +            return TRUE;
   
  -    case HSE_REQ_SEND_URL:
  -        /* Read any additional input */
  +        case HSE_REQ_SEND_URL:
  +            /* Read any additional input */
   
  -        if (r->remaining > 0) {
  -            char argsbuffer[HUGE_STRING_LEN];
  +            if (r->remaining > 0) {
  +                char argsbuffer[HUGE_STRING_LEN];
   
  -            while (ap_get_client_block(r, argsbuffer, HUGE_STRING_LEN));
  -        }
  +                while (ap_get_client_block(r, argsbuffer, HUGE_STRING_LEN));
  +            }
  +
  +            /* Reset the method to GET */
  +            r->method = ap_pstrdup(r->pool, "GET");
  +            r->method_number = M_GET;
   
  -        /* Reset the method to GET */
  -        r->method = ap_pstrdup(r->pool, "GET");
  -        r->method_number = M_GET;
  +            /* Don't let anyone think there's still data */
  +            ap_table_unset(r->headers_in, "Content-Length");
   
  -        /* Don't let anyone think there's still data */
  -        ap_table_unset(r->headers_in, "Content-Length");
  +            ap_internal_redirect((char *)lpvBuffer, r);
  +            return TRUE;
   
  -        ap_internal_redirect((char *)lpvBuffer, r);
  -        return TRUE;
  +        case HSE_REQ_SEND_RESPONSE_HEADER_EX:
  +            if (((LPHSE_SEND_HEADER_EX_INFO)lpvBuffer)->pszStatus
  +                && ((LPHSE_SEND_HEADER_EX_INFO)lpvBuffer)->cchStatus)
  +                r->status_line = ap_pstrndup(r->pool, 
  +                                             ((LPHSE_SEND_HEADER_EX_INFO)lpvBuffer)->pszStatus,
  +                                             ((LPHSE_SEND_HEADER_EX_INFO)lpvBuffer)->cchStatus);
  +            else
  +                r->status_line = ap_pstrdup(r->pool, "200 OK");
  +            sscanf(r->status_line, "%d", &r->status);
  +            cid->ecb->dwHttpStatusCode = r->status;
   
  -    case HSE_REQ_SEND_RESPONSE_HEADER:
  +          ((LPHSE_SEND_HEADER_EX_INFO)lpvBuffer)->pszHeader; // HTTP header
  +          ((LPHSE_SEND_HEADER_EX_INFO)lpvBuffer)->cchHeader; // HTTP header len
  +          
  +          ((LPHSE_SEND_HEADER_EX_INFO)lpvBuffer)->fKeepConn; // Keep alive? (bool)
  +
  +        case HSE_REQ_SEND_RESPONSE_HEADER:
               r->status_line = lpvBuffer ? lpvBuffer : ap_pstrdup(r->pool, "200 OK");
               sscanf(r->status_line, "%d", &r->status);
               cid->ecb->dwHttpStatusCode = r->status;
  @@ -472,20 +514,20 @@
                   /* End of headers */
                   if (*data == '\0') {
   #ifdef RELAX_HEADER_RULE
  -                        if (lf)
  +                    if (lf)
   #endif
  -                        data = lf + 1;  /* Reset data */
  -                        break;
  +                    data = lf + 1;  /* Reset data */
  +                    break;
                   }
   
                   if (!(value = strchr(data, ':'))) {
  -                        SetLastError(TODO_ERROR);
  -                        /* ### euh... we're passing the wrong type of error
  -                           ### code here */
  -                        ap_log_rerror(APLOG_MARK, APLOG_ERR,
  -                                      HTTP_INTERNAL_SERVER_ERROR, r,
  -                                      "ISA sent invalid headers", r->filename);
  -                        return FALSE;
  +                    SetLastError(TODO_ERROR);
  +                    /* ### euh... we're passing the wrong type of error
  +                       ### code here */
  +                    ap_log_rerror(APLOG_MARK, APLOG_ERR,
  +                                  HTTP_INTERNAL_SERVER_ERROR, r,
  +                                  "ISA sent invalid headers", r->filename);
  +                    return FALSE;
                   }
   
                   *value++ = '\0';
  @@ -497,15 +539,15 @@
                    */
   
                   if (!strcasecmp(data, "Content-Type")) {
  -                        char *tmp;
  -                        /* Nuke trailing whitespace */
  -                
  -                        char *endp = value + strlen(value) - 1;
  -                        while (endp > value && ap_isspace(*endp)) *endp-- = '\0';
  -
  -                        tmp = ap_pstrdup (r->pool, value);
  -                        ap_str_tolower(tmp);
  -                        r->content_type = tmp;
  +                    char *tmp;
  +                    /* Nuke trailing whitespace */
  +            
  +                    char *endp = value + strlen(value) - 1;
  +                    while (endp > value && ap_isspace(*endp)) *endp-- = '\0';
  +
  +                    tmp = ap_pstrdup (r->pool, value);
  +                    ap_str_tolower(tmp);
  +                    r->content_type = tmp;
                   }
                   else if (!strcasecmp(data, "Content-Length")) {
                       ap_table_set(r->headers_out, data, value);
  @@ -514,16 +556,16 @@
                       ap_table_set(r->headers_out, data, value);
                   }
                   else if (!strcasecmp(data, "Set-Cookie")) {
  -                        ap_table_add(r->err_headers_out, data, value);
  +                    ap_table_add(r->err_headers_out, data, value);
                   }
                   else {
  -                        ap_table_merge(r->err_headers_out, data, value);
  +                    ap_table_merge(r->err_headers_out, data, value);
                   }
   
                   /* Reset data */
   #ifdef RELAX_HEADER_RULE
                   if (!lf) {
  -                        data += p;
  +                    data += p;
                       break;
                   }
   #endif
  @@ -539,39 +581,62 @@
   
               return TRUE;
   
  -    case HSE_REQ_MAP_URL_TO_PATH:
  +        case HSE_REQ_MAP_URL_TO_PATH:
               /* Map a URL to a filename */
               subreq = ap_sub_req_lookup_uri(ap_pstrndup(r->pool, (char *)lpvBuffer,
  -                                                  *lpdwSize), r);
  +                                           *lpdwSize), r);
   
               GetFullPathName(subreq->filename, *lpdwSize - 1, (char *)lpvBuffer, NULL);
   
               /* IIS puts a trailing slash on directories, Apache doesn't */
   
               if (subreq->finfo.filetype == APR_DIR) {
  -                    int l = strlen((char *)lpvBuffer);
  +                int l = strlen((char *)lpvBuffer);
   
  -                    ((char *)lpvBuffer)[l] = '\\';
  -                    ((char *)lpvBuffer)[l + 1] = '\0';
  +                ((char *)lpvBuffer)[l] = '\\';
  +                ((char *)lpvBuffer)[l + 1] = '\0';
               }
   
               return TRUE;
   
  -    case HSE_REQ_DONE_WITH_SESSION:
  -            /* Do nothing... since we don't support async I/O, they'll
  -             * return from HttpExtensionProc soon
  +        case HSE_REQ_DONE_WITH_SESSION:
  +            /* TODO: Signal the main request with the event to complete the session
                */
               return TRUE;
   
  -    /* We don't support all this async I/O, Microsoft-specific stuff */
  -    case HSE_REQ_IO_COMPLETION:
  -    case HSE_REQ_TRANSMIT_FILE:
  -        /* ### euh... we're passing the wrong type of error code here */
  -        ap_log_rerror(APLOG_MARK, APLOG_WARNING,
  -                      HTTP_INTERNAL_SERVER_ERROR, r,
  -                      "ISAPI asynchronous I/O not supported: %s",
  -                      r->filename);
  -    default:
  +        /* We don't support all this async I/O, Microsoft-specific stuff */
  +        case HSE_REQ_IO_COMPLETION:
  +            /* TODO: Emulate a completion port, if we can...
  +             * Record the callback address and user defined argument...
  +             * we will call this after any async request (including transmitfile)
  +             * as if the request had been async.
  +             */
  +
  +        case HSE_REQ_TRANSMIT_FILE:
  +            /* Use TransmitFile (in leiu of WriteClient)... nothing wrong with that
  +             */
  +
  +            /* ### euh... we're passing the wrong type of error code here */
  +            ap_log_rerror(APLOG_MARK, APLOG_WARNING,
  +                          HTTP_INTERNAL_SERVER_ERROR, r,
  +                          "ISAPI asynchronous I/O not supported: %s",
  +                          r->filename);
  +
  +        case HSE_APPEND_LOG_PARAMETER:
  +            /* Log lpvBuffer, of lpdwSize bytes */
  +            return TRUE;
  +
  +        case HSE_REQ_ABORTIVE_CLOSE:
  +        case HSE_REQ_ASYNC_READ_CLIENT:
  +        case HSE_REQ_CLOSE_CONNECTION:
  +        case HSE_REQ_GET_CERT_INFO_EX:
  +        case HSE_REQ_GET_IMPERSONATION_TOKEN:
  +        case HSE_REQ_GET_SSPI_INFO:
  +        case HSE_REQ_IS_KEEP_CONN:
  +        case HSE_REQ_MAP_URL_TO_PATH_EX:
  +        case HSE_REQ_REFRESH_ISAPI_ACL:
  +
  +        default:
               SetLastError(ERROR_INVALID_PARAMETER);
               return FALSE;
       }
  @@ -589,6 +654,6 @@
      NULL,                        /* server config */
      NULL,                        /* merge server config */
      NULL,                        /* command ap_table_t */
  -   isapi_handlers,      /* handlers */
  +   isapi_handlers,              /* handlers */
      NULL                         /* register hooks */
   };
  
  
  
  1.14      +1 -0      apache-2.0/src/os/win32/util_win32.c
  
  Index: util_win32.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/win32/util_win32.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- util_win32.c	2000/06/17 21:06:24	1.13
  +++ util_win32.c	2000/07/25 00:58:20	1.14
  @@ -58,6 +58,7 @@
   
   #include "httpd.h"
   #include "http_log.h"
  +#include "apr_strings.h"
   
   #include <stdarg.h>
   #include <time.h>
  
  
  
  1.23      +2 -1      apache-2.0/src/modules/standard/mod_so.c
  
  Index: mod_so.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_so.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- mod_so.c	2000/07/15 01:07:42	1.22
  +++ mod_so.c	2000/07/25 00:58:20	1.23
  @@ -133,6 +133,7 @@
   #include "http_log.h"
   #include "ap_config.h"
   #include "apr_dso.h"
  +#include "apr_strings.h"
   
   module MODULE_VAR_EXPORT so_module;
   
  @@ -257,7 +258,7 @@
   
           return ap_pstrcat(cmd->pool, "Cannot load ", szModuleFile,
   			  " into server: ",
  -			  ap_dso_error(modhandle, my_error, sizeof(my_error)),
  +			  ap_strerror(status, my_error, sizeof(my_error)),
   			  NULL);
       }
       ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL,
  
  
  
  1.21      +2 -1      apache-2.0/src/modules/standard/mod_auth_digest.c
  
  Index: mod_auth_digest.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_auth_digest.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_auth_digest.c	2000/06/24 17:34:02	1.20
  +++ mod_auth_digest.c	2000/07/25 00:58:20	1.21
  @@ -114,6 +114,7 @@
   #include "apr_time.h"
   #include "apr_errno.h"
   #include "apr_lock.h"
  +#include "apr_strings.h"
   
   
   #if APR_HAS_SHARED_MEMORY
  @@ -498,7 +499,7 @@
   static const char *set_qop(cmd_parms *cmd, void *config, const char *op)
   {
       digest_config_rec *conf = (digest_config_rec *) config;
  -    const char **tmp;
  +    char **tmp;
       int cnt;
   
       if (!strcasecmp(op, "none")) {
  
  
  
  1.17      +2 -0      apache-2.0/src/modules/standard/mod_cern_meta.c
  
  Index: mod_cern_meta.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cern_meta.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- mod_cern_meta.c	2000/06/24 17:34:02	1.16
  +++ mod_cern_meta.c	2000/07/25 00:58:21	1.17
  @@ -155,6 +155,8 @@
   #include "util_script.h"
   #include "http_log.h"
   #include "http_request.h"
  +#include "apr_strings.h"
  +
   #ifdef HAVE_SYS_TYPES_H
   #include <sys/types.h>
   #endif
  
  
  
  1.19      +1 -0      apache-2.0/src/modules/standard/mod_expires.c
  
  Index: mod_expires.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_expires.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- mod_expires.c	2000/06/24 17:34:04	1.18
  +++ mod_expires.c	2000/07/25 00:58:21	1.19
  @@ -201,6 +201,7 @@
   #include "http_config.h"
   #include "http_log.h"
   #include "http_request.h"
  +#include "apr_strings.h"
   
   typedef struct {
       int active;
  
  
  
  1.19      +1 -0      apache-2.0/src/modules/standard/mod_file_cache.c
  
  Index: mod_file_cache.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_file_cache.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- mod_file_cache.c	2000/07/20 18:19:36	1.18
  +++ mod_file_cache.c	2000/07/25 00:58:21	1.19
  @@ -128,6 +128,7 @@
   #include "http_request.h"
   #include "http_core.h"
   #include "apr_mmap.h"
  +#include "apr_strings.h"
   
   module MODULE_VAR_EXPORT file_cache_module;
   static int once_through = 0;
  
  
  
  1.34      +8 -7      apache-2.0/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- mod_rewrite.c	2000/07/14 20:03:09	1.33
  +++ mod_rewrite.c	2000/07/25 00:58:21	1.34
  @@ -96,6 +96,7 @@
   #include "http_log.h"
   #include "http_protocol.h"
   #include "mod_rewrite.h"
  +#include "apr_strings.h"
   
   #if !defined(OS2) && !defined(WIN32)
   #include "unixd.h"
  @@ -442,7 +443,7 @@
       }
       else {
           return ap_pstrcat(p, "RewriteOptions: unknown option '",
  -                          name, "'\n", NULL);
  +                          name, "'", NULL);
       }
       return NULL;
   }
  @@ -606,7 +607,7 @@
       /*  parse the argument line ourself */
       if (parseargline(str, &a1, &a2, &a3)) {
           return ap_pstrcat(cmd->pool, "RewriteCond: bad argument line '", str,
  -                          "'\n", NULL);
  +                          "'", NULL);
       }
   
       /*  arg1: the input string */
  @@ -644,7 +645,7 @@
       if (rc) {
           return ap_pstrcat(cmd->pool,
                             "RewriteCond: cannot compile regular expression '",
  -                          a2, "'\n", NULL);
  +                          a2, "'", NULL);
       }
   
       newcond->pattern = ap_pstrdup(cmd->pool, cp);
  @@ -717,7 +718,7 @@
           cfg->flags |= CONDFLAG_ORNEXT;
       }
       else {
  -        return ap_pstrcat(p, "RewriteCond: unknown flag '", key, "'\n", NULL);
  +        return ap_pstrcat(p, "RewriteCond: unknown flag '", key, "'", NULL);
       }
       return NULL;
   }
  @@ -749,7 +750,7 @@
       /*  parse the argument line ourself */
       if (parseargline(str, &a1, &a2, &a3)) {
           return ap_pstrcat(cmd->pool, "RewriteRule: bad argument line '", str,
  -                          "'\n", NULL);
  +                          "'", NULL);
       }
   
       /* arg3: optional flags field */
  @@ -780,7 +781,7 @@
       if ((regexp = ap_pregcomp(cmd->pool, cp, mode)) == NULL) {
           return ap_pstrcat(cmd->pool,
                             "RewriteRule: cannot compile regular expression '",
  -                          a1, "'\n", NULL);
  +                          a1, "'", NULL);
       }
       newrule->pattern = ap_pstrdup(cmd->pool, cp);
       newrule->regexp  = regexp;
  @@ -952,7 +953,7 @@
           cfg->flags |= RULEFLAG_NOCASE;
       }
       else {
  -        return ap_pstrcat(p, "RewriteRule: unknown flag '", key, "'\n", NULL);
  +        return ap_pstrcat(p, "RewriteRule: unknown flag '", key, "'", NULL);
       }
       return NULL;
   }
  
  
  
  1.16      +1 -0      apache-2.0/src/modules/standard/mod_speling.c
  
  Index: mod_speling.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_speling.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- mod_speling.c	2000/05/27 22:40:37	1.15
  +++ mod_speling.c	2000/07/25 00:58:21	1.16
  @@ -64,6 +64,7 @@
   #include "http_request.h"
   #include "http_log.h"
   #include "apr_file_io.h"
  +#include "apr_strings.h"
   
   /* mod_speling.c - by Alexei Kosut <ak...@organic.com> June, 1996
    *
  
  
  
  1.17      +1 -0      apache-2.0/src/modules/standard/mod_usertrack.c
  
  Index: mod_usertrack.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_usertrack.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- mod_usertrack.c	2000/05/27 22:40:38	1.16
  +++ mod_usertrack.c	2000/07/25 00:58:21	1.17
  @@ -104,6 +104,7 @@
   #include "http_config.h"
   #include "http_core.h"
   #include "http_request.h"
  +#include "apr_strings.h"
   
   module MODULE_VAR_EXPORT usertrack_module;
   
  
  
  
  1.89      +4 -3      apache-2.0/src/modules/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- mpm_winnt.c	2000/07/10 23:12:26	1.88
  +++ mpm_winnt.c	2000/07/25 00:58:22	1.89
  @@ -65,6 +65,7 @@
   #include "http_connection.h"
   #include "apr_portable.h"
   #include "apr_getopt.h"
  +#include "apr_strings.h"
   #include "ap_mpm.h"
   #include "ap_config.h"
   #include "ap_listen.h"
  @@ -780,8 +781,8 @@
           context->sa_client = ap_palloc(context->ptrans, len);
           if ((getpeername(context->accept_socket,
                            context->sa_client, &len)) == SOCKET_ERROR) {
  -            ap_log_error(APLOG_MARK, APLOG_WARNING, h_errno, server_conf, 
  -                         "getpeername failed with error %d\n", WSAGetLastError());
  +            ap_log_error(APLOG_MARK, APLOG_WARNING, WSAGetLastError(), server_conf, 
  +                         "getpeername failed");
               memset(&context->sa_client, '\0', sizeof(context->sa_client));
           }
   
  @@ -1510,7 +1511,7 @@
       /* Create a pipe to send socket info to the child */
       if (!CreatePipe(&hPipeRead, &hPipeWrite, &sa, 0)) {
           ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf,
  -                     "Parent: Unable to create pipe to child process.\n");
  +                     "Parent: Unable to create pipe to child process.");
           return -1;
       }
   
  
  
  
  1.24      +1 -0      apache-2.0/src/modules/mpm/winnt/registry.c
  
  Index: registry.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/registry.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- registry.c	2000/05/31 15:28:52	1.23
  +++ registry.c	2000/07/25 00:58:22	1.24
  @@ -76,6 +76,7 @@
   #include "httpd.h"
   #include "http_log.h"
   #include "mpm_winnt.h"
  +#include "apr_strings.h"
   
   /* bet you are looking to change revisions to roll the tarball...
    * Guess what, you already did.  Revised May '00 to save you from 
  
  
  
  1.19      +1 -0      apache-2.0/src/modules/mpm/winnt/service.c
  
  Index: service.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/service.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- service.c	2000/07/10 23:12:29	1.18
  +++ service.c	2000/07/25 00:58:22	1.19
  @@ -86,6 +86,7 @@
   #include "http_conf_globals.h"
   #include "http_log.h"
   #include "mpm_winnt.h"
  +#include "apr_strings.h"
   
   char *service_name = NULL;
   char *display_name = NULL;
  
  
  

Re: cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c registry.c service.c

Posted by Greg Stein <gs...@lyra.org>.
On Tue, Jul 25, 2000 at 12:58:23AM -0000, wrowe@locus.apache.org wrote:
> wrowe       00/07/24 17:58:23
> 
>   Modified:    src/os/win32 mod_isapi.c util_win32.c
>                src/modules/standard mod_so.c mod_auth_digest.c
>                         mod_cern_meta.c mod_expires.c mod_file_cache.c
>                         mod_rewrite.c mod_speling.c mod_usertrack.c
>                src/modules/mpm/winnt mpm_winnt.c registry.c service.c
>   Log:
>     Missing apr_strings.h - hope this wasn't destined for some global header.

I hope not. Big "mother includes" are a bit painful to work with over the
long haul. Some short-term convenience is transformed into long-term
understandability and maintainability issues.

And yes: this is arguably a personal preference, so no need to tell me that
I'm a dumbass :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c registry.c service.c

Posted by Greg Stein <gs...@lyra.org>.
On Mon, Jul 24, 2000 at 10:42:35PM -0500, William A. Rowe, Jr. wrote:
> > From: Greg Stein [mailto:gstein@lyra.org]
> > Sent: Monday, July 24, 2000 10:21 PM
> > 
> > I didn't review this patch much at all when it first came through. I
> > thought, "adding apr_strings.h headers? simple enough. [scan scan] yah,
> > looks like that is all that is happening in there."
> > 
> > But no... you had other changes embedded in there. As a result, they were
> > committed without any effective opportunity for somebody to review them.
> 
> That's why I noted the discrepancies to the list... didn't intend to mix
> the issues or add other fixes to any of the commits :(  That's what comes
> from not completing these oddballs plus paring back down to one tree.

It might also be from doing "cvs commit" at the top of the tree. I've seen
FirstBill check in bungled code because it grabbed stuff he didn't intend.

Solution? Always list the files on the "cvs commit" line. Or at least
specify a bottom-most directory where you know what will be committed.

> > Can we say "split the patches!" 100 times fast? :-)
> >
> > Go watch Teletubbies for an hour for penance.
> 
> I actually escaped that one... only horrid videos around here are Barney :)

hehe :-)

>...
> As a further footnote... I added apr/lib/shmem/win32/shmem.c to the aprlib
> Win32 project, tagged as excluded from the build, which I'm hacking around
> with.  Shouldn't harm the build since it's excluded, though, and I'll commit
> a real module or kill the reference within a week.

*shrug*

Doesn't affect my Linux builds :-) You're the Win32 man. If it makes sense
for you and you think it makes sense for Apache on Win32, then fine!

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

RE: cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c registry.c service.c

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> From: Greg Stein [mailto:gstein@lyra.org]
> Sent: Monday, July 24, 2000 10:21 PM
> 
> I didn't review this patch much at all when it first came through. I
> thought, "adding apr_strings.h headers? simple enough. [scan scan] yah,
> looks like that is all that is happening in there."
> 
> But no... you had other changes embedded in there. As a result, they were
> committed without any effective opportunity for somebody to review them.

That's why I noted the discrepancies to the list... didn't intend to mix
the issues or add other fixes to any of the commits :(  That's what comes
from not completing these oddballs plus paring back down to one tree.

> Can we say "split the patches!" 100 times fast? :-)
>
> Go watch Teletubbies for an hour for penance.

I actually escaped that one... only horrid videos around here are Barney :)

> Retract it. DSO error strings are always constructed with ap_dso_error().

Done.

> > This is a correct change. tmp[] is modified in that function.

Retained.

As a further footnote... I added apr/lib/shmem/win32/shmem.c to the aprlib
Win32 project, tagged as excluded from the build, which I'm hacking around
with.  Shouldn't harm the build since it's excluded, though, and I'll commit
a real module or kill the reference within a week.


Re: cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c registry.c service.c

Posted by Greg Stein <gs...@lyra.org>.
Oh. *VERY* important meta-point.

I didn't review this patch much at all when it first came through. I
thought, "adding apr_strings.h headers? simple enough. [scan scan] yah,
looks like that is all that is happening in there."

But no... you had other changes embedded in there. As a result, they were
committed without any effective opportunity for somebody to review them.

Can we say "split the patches!" 100 times fast? :-)

Go watch Teletubbies for an hour for penance.

Cheers,
-g

On Mon, Jul 24, 2000 at 08:18:05PM -0700, Greg Stein wrote:
> On Mon, Jul 24, 2000 at 08:28:13PM -0500, William A. Rowe, Jr. wrote:
> >...
> > >   --- mod_so.c	2000/07/15 01:07:42	1.22
> > >   +++ mod_so.c	2000/07/25 00:58:20	1.23
> > >   @@ -257,7 +258,7 @@
> > >    
> > >            return ap_pstrcat(cmd->pool, "Cannot load ", szModuleFile,
> > >    			  " into server: ",
> > >   -			  ap_dso_error(modhandle, my_error, sizeof(my_error)),
> > >   +			  ap_strerror(status, my_error, sizeof(my_error)),
> > >    			  NULL);
> > >        }
> > 
> > Sorry, a quick fix.  Is this reasonable or should I retract it?
> 
> Retract it. DSO error strings are always constructed with ap_dso_error().
> 
> >...
> > >   --- mod_auth_digest.c	2000/06/24 17:34:02	1.20
> > >   +++ mod_auth_digest.c	2000/07/25 00:58:20	1.21
> > >   @@ -498,7 +499,7 @@
> > >    static const char *set_qop(cmd_parms *cmd, void *config, const char *op)
> > >    {
> > >        digest_config_rec *conf = (digest_config_rec *) config;
> > >   -    const char **tmp;
> > >   +    char **tmp;
> > >        int cnt;
> > 
> > Was causing constness errors, as I recall, but it can be retracted.
> 
> This is a correct change. tmp[] is modified in that function.
> 
> Cheers,
> -g
> 
> -- 
> Greg Stein, http://www.lyra.org/

-- 
Greg Stein, http://www.lyra.org/

Re: cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c registry.c service.c

Posted by "Life is hard, and then you die" <ro...@innovation.ch>.
On Mon, Jul 24, 2000 at 08:18:05PM -0700, Greg Stein wrote:
> On Mon, Jul 24, 2000 at 08:28:13PM -0500, William A. Rowe, Jr. wrote:
> >...
> > >   --- mod_auth_digest.c	2000/06/24 17:34:02	1.20
> > >   +++ mod_auth_digest.c	2000/07/25 00:58:20	1.21
> > >   @@ -498,7 +499,7 @@
> > >    static const char *set_qop(cmd_parms *cmd, void *config, const char *op)
> > >    {
> > >        digest_config_rec *conf = (digest_config_rec *) config;
> > >   -    const char **tmp;
> > >   +    char **tmp;
> > >        int cnt;
> > 
> > Was causing constness errors, as I recall, but it can be retracted.
> 
> This is a correct change. tmp[] is modified in that function.

Umm, sorry to be so dense, but I don't understand why the const was
wrong. Yes, tmp[] is modified, but the declaration isn't
'char * const *tmp;'. What compiler gave what sort of warning?


  Cheers,

  Ronald


Re: cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c registry.c service.c

Posted by Greg Stein <gs...@lyra.org>.
On Mon, Jul 24, 2000 at 08:28:13PM -0500, William A. Rowe, Jr. wrote:
>...
> >   --- mod_so.c	2000/07/15 01:07:42	1.22
> >   +++ mod_so.c	2000/07/25 00:58:20	1.23
> >   @@ -257,7 +258,7 @@
> >    
> >            return ap_pstrcat(cmd->pool, "Cannot load ", szModuleFile,
> >    			  " into server: ",
> >   -			  ap_dso_error(modhandle, my_error, sizeof(my_error)),
> >   +			  ap_strerror(status, my_error, sizeof(my_error)),
> >    			  NULL);
> >        }
> 
> Sorry, a quick fix.  Is this reasonable or should I retract it?

Retract it. DSO error strings are always constructed with ap_dso_error().

>...
> >   --- mod_auth_digest.c	2000/06/24 17:34:02	1.20
> >   +++ mod_auth_digest.c	2000/07/25 00:58:20	1.21
> >   @@ -498,7 +499,7 @@
> >    static const char *set_qop(cmd_parms *cmd, void *config, const char *op)
> >    {
> >        digest_config_rec *conf = (digest_config_rec *) config;
> >   -    const char **tmp;
> >   +    char **tmp;
> >        int cnt;
> 
> Was causing constness errors, as I recall, but it can be retracted.

This is a correct change. tmp[] is modified in that function.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

RE: cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c registry.c service.c

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
Just highlighting potential problems...

> wrowe       00/07/24 17:58:23
> 
>   Modified:    src/os/win32 mod_isapi.c util_win32.c
>                src/modules/standard mod_so.c mod_auth_digest.c
>                         mod_cern_meta.c mod_expires.c mod_file_cache.c
>                         mod_rewrite.c mod_speling.c mod_usertrack.c
>                src/modules/mpm/winnt mpm_winnt.c registry.c service.c
>   Log:
>     Missing apr_strings.h - hope this wasn't destined for 
> some global header.
>   
>   Revision  Changes    Path
>   1.13      +142 -77   apache-2.0/src/os/win32/mod_isapi.c
>   
>   Index: mod_isapi.c
>   ===================================================================

Sorry, ignore this mess (other than the apr_strings.h), I will finish
the patch so it is functionally equiv. to the original.  I'm setting in
all the placeholders for missing 5.0 functionallity and adding comments
on how they might be implemented.  Existing tabs didn't help this commit
either :(  The net codepath change by tommorow night will be null, and 
will be a good place to start working from.


>   1.23      +2 -1      apache-2.0/src/modules/standard/mod_so.c
>   
>   Index: mod_so.c
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_so.c,v
>   retrieving revision 1.22
>   retrieving revision 1.23
>   diff -u -r1.22 -r1.23
>   --- mod_so.c	2000/07/15 01:07:42	1.22
>   +++ mod_so.c	2000/07/25 00:58:20	1.23
>   @@ -257,7 +258,7 @@
>    
>            return ap_pstrcat(cmd->pool, "Cannot load ", szModuleFile,
>    			  " into server: ",
>   -			  ap_dso_error(modhandle, my_error, sizeof(my_error)),
>   +			  ap_strerror(status, my_error, sizeof(my_error)),
>    			  NULL);
>        }

Sorry, a quick fix.  Is this reasonable or should I retract it?

>   1.21      +2 -1      
> apache-2.0/src/modules/standard/mod_auth_digest.c
>   
>   Index: mod_auth_digest.c
>   ===================================================================
>   RCS file: 
> /home/cvs/apache-2.0/src/modules/standard/mod_auth_digest.c,v
>   retrieving revision 1.20
>   retrieving revision 1.21
>   diff -u -r1.20 -r1.21
>   --- mod_auth_digest.c	2000/06/24 17:34:02	1.20
>   +++ mod_auth_digest.c	2000/07/25 00:58:20	1.21
>   @@ -498,7 +499,7 @@
>    static const char *set_qop(cmd_parms *cmd, void *config, const char *op)
>    {
>        digest_config_rec *conf = (digest_config_rec *) config;
>   -    const char **tmp;
>   +    char **tmp;
>        int cnt;

Was causing constness errors, as I recall, but it can be retracted.

>   1.34      +8 -7      apache-2.0/src/modules/standard/mod_rewrite.c
>   
>   Index: mod_rewrite.c
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_rewrite.c,v
>   retrieving revision 1.33
>   retrieving revision 1.34
>   diff -u -r1.33 -r1.34
>   --- mod_rewrite.c	2000/07/14 20:03:09	1.33
>   +++ mod_rewrite.c	2000/07/25 00:58:21	1.34
>   @@ -442,7 +443,7 @@
>        }
>        else {
>            return ap_pstrcat(p, "RewriteOptions: unknown option '",
>   -                          name, "'\n", NULL);
>   +                          name, "'", NULL);

etc... this is returned and blatted into the log, but it didn't appear
to need any newline delimiter at all (given that we don't pass trailing
newlines to the log fn's.)

Otherwise just a few /n redactions from the log function calls.  Sorry,
those were ment for the following commit.

Re: cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c registry.cservice.c

Posted by Ben Laurie <be...@algroup.co.uk>.
rbb@apache.org wrote:
> 
> On 25 Jul 2000 wrowe@locus.apache.org wrote:
> 
> > wrowe       00/07/24 17:58:23
> >
> >   Modified:    src/os/win32 mod_isapi.c util_win32.c
> >                src/modules/standard mod_so.c mod_auth_digest.c
> >                         mod_cern_meta.c mod_expires.c mod_file_cache.c
> >                         mod_rewrite.c mod_speling.c mod_usertrack.c
> >                src/modules/mpm/winnt mpm_winnt.c registry.c service.c
> >   Log:
> >     Missing apr_strings.h - hope this wasn't destined for some global header.
> 
> Never!  :-)  I thought we all agreed that global headers including other
> headers was a big no-no.

Did we? I think there are cases where its undesirable, but always?

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

Coming to ApacheCon Europe 2000? http://apachecon.com/

Re: cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c registry.cservice.c

Posted by Ben Laurie <be...@algroup.co.uk>.
rbb@apache.org wrote:
> 
> On 25 Jul 2000 wrowe@locus.apache.org wrote:
> 
> > wrowe       00/07/24 17:58:23
> >
> >   Modified:    src/os/win32 mod_isapi.c util_win32.c
> >                src/modules/standard mod_so.c mod_auth_digest.c
> >                         mod_cern_meta.c mod_expires.c mod_file_cache.c
> >                         mod_rewrite.c mod_speling.c mod_usertrack.c
> >                src/modules/mpm/winnt mpm_winnt.c registry.c service.c
> >   Log:
> >     Missing apr_strings.h - hope this wasn't destined for some global header.
> 
> Never!  :-)  I thought we all agreed that global headers including other
> headers was a big no-no.

Did we? I think there are cases where its undesirable, but always?

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

Coming to ApacheCon Europe 2000? http://apachecon.com/

Re: cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c registry.c service.c

Posted by rb...@apache.org.
On 25 Jul 2000 wrowe@locus.apache.org wrote:

> wrowe       00/07/24 17:58:23
> 
>   Modified:    src/os/win32 mod_isapi.c util_win32.c
>                src/modules/standard mod_so.c mod_auth_digest.c
>                         mod_cern_meta.c mod_expires.c mod_file_cache.c
>                         mod_rewrite.c mod_speling.c mod_usertrack.c
>                src/modules/mpm/winnt mpm_winnt.c registry.c service.c
>   Log:
>     Missing apr_strings.h - hope this wasn't destined for some global header.

Never!  :-)  I thought we all agreed that global headers including other
headers was a big no-no.

Ryan


Re: cvs commit: apache-2.0/src/modules/mpm/winnt mpm_winnt.c registry.c service.c

Posted by rb...@apache.org.
On 25 Jul 2000 wrowe@locus.apache.org wrote:

> wrowe       00/07/24 17:58:23
> 
>   Modified:    src/os/win32 mod_isapi.c util_win32.c
>                src/modules/standard mod_so.c mod_auth_digest.c
>                         mod_cern_meta.c mod_expires.c mod_file_cache.c
>                         mod_rewrite.c mod_speling.c mod_usertrack.c
>                src/modules/mpm/winnt mpm_winnt.c registry.c service.c
>   Log:
>     Missing apr_strings.h - hope this wasn't destined for some global header.

Never!  :-)  I thought we all agreed that global headers including other
headers was a big no-no.

Ryan