httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@hyperreal.org
Subject cvs commit: apache-1.3/src/modules/standard mod_auth.c mod_digest.c mod_rewrite.c
Date Wed, 01 Jul 1998 21:20:02 GMT
ben         98/07/01 14:20:01

  Modified:    src/include http_core.h http_protocol.h
               src/main http_core.c http_protocol.c http_request.c
               src/modules/standard mod_auth.c mod_digest.c mod_rewrite.c
  Log:
  Yet more constification.
  
  Revision  Changes    Path
  1.44      +5 -5      apache-1.3/src/include/http_core.h
  
  Index: http_core.h
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/include/http_core.h,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- http_core.h	1998/05/03 17:31:08	1.43
  +++ http_core.h	1998/07/01 21:19:51	1.44
  @@ -97,8 +97,8 @@
   
   API_EXPORT(int) ap_allow_options (request_rec *);
   API_EXPORT(int) ap_allow_overrides (request_rec *);
  -API_EXPORT(char *) ap_default_type (request_rec *);     
  -API_EXPORT(char *) ap_document_root (request_rec *); /* Don't use this!  If your request
went
  +API_EXPORT(const char *) ap_default_type (request_rec *);     
  +API_EXPORT(const char *) ap_document_root (request_rec *); /* Don't use this!  If your
request went
   				      * through a Userdir, or something like
   				      * that, it'll screw you.  But it's
   				      * back-compatible...
  @@ -125,10 +125,10 @@
       char *requirement;
   } require_line;
        
  -API_EXPORT(char *) ap_auth_type (request_rec *);
  -API_EXPORT(char *) ap_auth_name (request_rec *);     
  +API_EXPORT(const char *) ap_auth_type (request_rec *);
  +API_EXPORT(const char *) ap_auth_name (request_rec *);     
   API_EXPORT(int) ap_satisfies (request_rec *r);
  -API_EXPORT(array_header *) ap_requires (request_rec *);    
  +API_EXPORT(const array_header *) ap_requires (request_rec *);    
   
   #ifdef CORE_PRIVATE
   
  
  
  
  1.44      +1 -1      apache-1.3/src/include/http_protocol.h
  
  Index: http_protocol.h
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/include/http_protocol.h,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- http_protocol.h	1998/05/06 15:04:11	1.43
  +++ http_protocol.h	1998/07/01 21:19:51	1.44
  @@ -195,7 +195,7 @@
   API_EXPORT(void) ap_note_auth_failure(request_rec *r);
   API_EXPORT(void) ap_note_basic_auth_failure(request_rec *r);
   API_EXPORT(void) ap_note_digest_auth_failure(request_rec *r);
  -API_EXPORT(int) ap_get_basic_auth_pw(request_rec *r, char **pw);
  +API_EXPORT(int) ap_get_basic_auth_pw(request_rec *r, const char **pw);
   
   /*
    * Setting up the protocol fields for subsidiary requests...
  
  
  
  1.205     +5 -5      apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.204
  retrieving revision 1.205
  diff -u -r1.204 -r1.205
  --- http_core.c	1998/06/16 03:37:28	1.204
  +++ http_core.c	1998/07/01 21:19:53	1.205
  @@ -400,7 +400,7 @@
       return conf->override; 
   } 
   
  -API_EXPORT(char *) ap_auth_type (request_rec *r)
  +API_EXPORT(const char *) ap_auth_type (request_rec *r)
   {
       core_dir_config *conf = 
         (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module);

  @@ -408,7 +408,7 @@
       return conf->ap_auth_type;
   }
   
  -API_EXPORT(char *) ap_auth_name (request_rec *r)
  +API_EXPORT(const char *) ap_auth_name (request_rec *r)
   {
       core_dir_config *conf = 
         (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module);

  @@ -416,7 +416,7 @@
       return conf->ap_auth_name;
   }
   
  -API_EXPORT(char *) ap_default_type (request_rec *r)
  +API_EXPORT(const char *) ap_default_type (request_rec *r)
   {
       core_dir_config *conf = 
         (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module);

  @@ -424,7 +424,7 @@
       return conf->ap_default_type ? conf->ap_default_type : DEFAULT_CONTENT_TYPE;
   }
   
  -API_EXPORT(char *) ap_document_root (request_rec *r) /* Don't use this!!! */
  +API_EXPORT(const char *) ap_document_root (request_rec *r) /* Don't use this!!! */
   {
       core_server_config *conf = 
         (core_server_config *)ap_get_module_config(r->server->module_config,
  @@ -433,7 +433,7 @@
       return conf->ap_document_root;
   }
   
  -API_EXPORT(array_header *) ap_requires (request_rec *r)
  +API_EXPORT(const array_header *) ap_requires (request_rec *r)
   {
       core_dir_config *conf = 
         (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module);

  
  
  
  1.222     +3 -3      apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.221
  retrieving revision 1.222
  diff -u -r1.221 -r1.222
  --- http_protocol.c	1998/06/27 18:09:29	1.221
  +++ http_protocol.c	1998/07/01 21:19:53	1.222
  @@ -913,12 +913,12 @@
   		ap_auth_name(r), r->request_time));
   }
   
  -API_EXPORT(int) ap_get_basic_auth_pw(request_rec *r, char **pw)
  +API_EXPORT(int) ap_get_basic_auth_pw(request_rec *r, const char **pw)
   {
       const char *auth_line = ap_table_get(r->headers_in,
                                         r->proxyreq ? "Proxy-Authorization"
                                                     : "Authorization");
  -    char *t;
  +    const char *t;
   
       if (!(t = ap_auth_type(r)) || strcasecmp(t, "Basic"))
           return DECLINED;
  @@ -947,7 +947,7 @@
        * because it has the lifetime of the connection.  The other allocations
        * are temporary and can be tossed away any time.
        */
  -    r->connection->user = ap_getword_nulls_nc (r->connection->pool, &t,
':');
  +    r->connection->user = ap_getword_nulls (r->connection->pool, &t, ':');
       r->connection->ap_auth_type = "Basic";
   
       *pw = t;
  
  
  
  1.125     +1 -1      apache-1.3/src/main/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_request.c,v
  retrieving revision 1.124
  retrieving revision 1.125
  diff -u -r1.124 -r1.125
  --- http_request.c	1998/06/27 18:09:29	1.124
  +++ http_request.c	1998/07/01 21:19:54	1.125
  @@ -994,7 +994,7 @@
   {
       /* Is there a require line configured for the type of *this* req? */
   
  -    array_header *reqs_arr = ap_requires(r);
  +    const array_header *reqs_arr = ap_requires(r);
       require_line *reqs;
       int i;
   
  
  
  
  1.36      +1 -1      apache-1.3/src/modules/standard/mod_auth.c
  
  Index: mod_auth.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_auth.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- mod_auth.c	1998/04/11 12:00:44	1.35
  +++ mod_auth.c	1998/07/01 21:19:58	1.36
  @@ -240,7 +240,7 @@
       register int x;
       const char *t, *w;
       table *grpstatus;
  -    array_header *reqs_arr = ap_requires(r);
  +    const array_header *reqs_arr = ap_requires(r);
       require_line *reqs;
   
       /* BUG FIX: tadc, 11-Nov-1995.  If there is no "requires" directive, 
  
  
  
  1.35      +3 -2      apache-1.3/src/modules/standard/mod_digest.c
  
  Index: mod_digest.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_digest.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- mod_digest.c	1998/04/11 12:00:46	1.34
  +++ mod_digest.c	1998/07/01 21:19:59	1.35
  @@ -141,7 +141,8 @@
                                       : "Authorization");
       int l;
       int s, vk = 0, vv = 0;
  -    char *t, *key, *value;
  +    const char *t;
  +    char *key, *value;
   
       if (!(t = ap_auth_type(r)) || strcasecmp(t, "Digest"))
   	return DECLINED;
  @@ -320,7 +321,7 @@
       register int x;
       const char *t;
       char *w;
  -    array_header *reqs_arr;
  +    const array_header *reqs_arr;
       require_line *reqs;
   
       if (!(t = ap_auth_type(r)) || strcasecmp(t, "Digest"))
  
  
  
  1.120     +6 -4      apache-1.3/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -u -r1.119 -r1.120
  --- mod_rewrite.c	1998/06/27 18:09:32	1.119
  +++ mod_rewrite.c	1998/07/01 21:19:59	1.120
  @@ -1001,6 +1001,7 @@
       char buf[512];
       char docroot[512];
       char *cp, *cp2;
  +    const char *ccp;
       struct stat finfo;
       unsigned int port;
       int n;
  @@ -1228,8 +1229,8 @@
                */
               n = prefix_stat(r->filename, &finfo);
               if (n == 0) {
  -                if ((cp = ap_document_root(r)) != NULL) {
  -                    l = ap_cpystrn(docroot, cp, sizeof(docroot)) - docroot;
  +                if ((ccp = ap_document_root(r)) != NULL) {
  +                    l = ap_cpystrn(docroot, ccp, sizeof(docroot)) - docroot;
   
                       /* always NOT have a trailing slash */
                       if (docroot[l-1] == '/') {
  @@ -1302,6 +1303,7 @@
       rewrite_perdir_conf *dconf;
       char *cp;
       char *cp2;
  +    const char *ccp;
       char *prefix;
       int l;
       int n;
  @@ -1519,8 +1521,8 @@
                    * for this webserver and only try to remove the
                    * document_root if it is prefix
                    */
  -                if ((cp = ap_document_root(r)) != NULL) {
  -                    prefix = ap_pstrdup(r->pool, cp);
  +                if ((ccp = ap_document_root(r)) != NULL) {
  +                    prefix = ap_pstrdup(r->pool, ccp);
                       /* always NOT have a trailing slash */
                       l = strlen(prefix);
                       if (prefix[l-1] == '/') {
  
  
  

Mime
View raw message