httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@hyperreal.com>
Subject cvs commit: apache/src CHANGES http_request.c http_request.h httpd.h mod_actions.c mod_alias.c mod_asis.c mod_cgi.c mod_imap.c mod_include.c mod_mime.c mod_negotiation.c mod_proxy.c
Date Sun, 31 Mar 1996 01:07:10 GMT
akosut      96/03/30 17:07:09

  Modified:    cgi-bin   footer
               conf      srm.conf-dist
               src       CHANGES http_request.c http_request.h httpd.h
                        mod_actions.c  mod_alias.c mod_asis.c mod_cgi.c
                        mod_imap.c mod_include.c  mod_mime.c
                        mod_negotiation.c mod_proxy.c
  Log:
  Add AddHandler command, which allows r->handler to be set by a filename
  extension. Modify the rest of Apache to make use of this change, as well as
  the example lines in srm.conf-dist. This almost completely removes the
  "magic" content types from Apache, although they will still work, for
  back-compatibility with existing configuration files.
  
  Revision  Changes    Path
  1.2       +0 -1      apache/cgi-bin/footer
  
  Index: footer
  ===================================================================
  RCS file: /export/home/cvs/apache/cgi-bin/footer,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -C3 -r1.1 -r1.2
  *** footer	1996/02/22 11:45:47	1.1
  --- footer	1996/03/31 01:06:56	1.2
  ***************
  *** 1,6 ****
    #!/bin/sh
    
  - echo Content-type: text/html
    echo
    
    /bin/cat $PATH_TRANSLATED
  --- 1,5 ----
  
  
  
  1.3       +22 -22    apache/conf/srm.conf-dist
  
  Index: srm.conf-dist
  ===================================================================
  RCS file: /export/home/cvs/apache/conf/srm.conf-dist,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -C3 -r1.2 -r1.3
  *** srm.conf-dist	1996/02/22 11:45:49	1.2
  --- srm.conf-dist	1996/03/31 01:06:57	1.3
  ***************
  *** 145,185 ****
    # make certain files to be certain types.
    # Format: AddType type/subtype ext1
    
  ! #AddType text/x-server-parsed-html .shtml
  ! #AddType application/x-httpd-cgi .cgi
  ! 
  ! # For server-side includes which will be treated as HTML3
  ! # for purposes of content negotiation, use
  ! 
  ! #AddType text/x-server-parsed-html3 .shtml3
    
    # Uncomment the following line to enable Apache's send-asis HTTP file
    # feature
  ! 
  ! #AddType httpd/send-as-is asis
  ! 
  ! # To enable type maps, you might want to use
  ! 
  ! #AddType application/x-type-map var
    
    # If you wish to use server-parsed imagemap files, use
    
  ! #AddType application/x-httpd-imap map
    
    # Action lets you define media types that will execute a script whenever
    # a matching file is called. This eliminates the need for repeated URL
    # pathnames for oft-used CGI file processors.
  ! # Format: Action type/subtype /cgi-script/location
    
  ! # For example, to add a footer (footer.html in your document root) to all
  ! # HTML files, uncomment the following:
    
    #Action text/html /cgi-bin/footer
  - 
  - # If you want to do this for only files with extension ".fhtml", use
  - 
  - #AddType httpd/footer-html fhtml
  - #Action httpd/footer-html /cgi-bin/footer
    
    # MetaDir: specifies the name of the directory in which Apache can find
    # meta information files. These files contain additional HTTP headers
  --- 145,185 ----
    # make certain files to be certain types.
    # Format: AddType type/subtype ext1
    
  ! # AddHandler allows you to map certain file extensions to "handlers",
  ! # actions unrelated to filetype. These can be either built into the server
  ! # or added with the Action command (see below)
  ! # Format: AddHandler action-name ext1
  ! 
  ! # To use CGI scripts:
  ! #AddHandler cgi-script .cgi
  ! 
  ! # To use server-parsed HTML files
  ! #AddType text/html .shtml
  ! #AddHandler server-parsed .shtml
    
    # Uncomment the following line to enable Apache's send-asis HTTP file
    # feature
  ! #AddHandler send-as-is asis
    
    # If you wish to use server-parsed imagemap files, use
  + #AddHandler imap-file map
    
  ! # To enable type maps, you might want to use
  ! #AddHandler type-map var
    
    # Action lets you define media types that will execute a script whenever
    # a matching file is called. This eliminates the need for repeated URL
    # pathnames for oft-used CGI file processors.
  ! # Format: Action media/type /cgi-script/location
  ! # Format: Action handler-name /cgi-script/location
    
  ! # For example to add a footer (footer.html in your document root) to
  ! # files with extension .foot (e.g. foo.html.foot), you could use:
  ! #AddHandler foot-action foot
  ! #Action foot-action /cgi-bin/footer
    
  + # Or to do this for all HTML files, for example, use:
    #Action text/html /cgi-bin/footer
    
    # MetaDir: specifies the name of the directory in which Apache can find
    # meta information files. These files contain additional HTTP headers
  
  
  
  1.19      +6 -1      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -C3 -r1.18 -r1.19
  *** CHANGES	1996/03/30 15:31:12	1.18
  --- CHANGES	1996/03/31 01:06:58	1.19
  ***************
  *** 1,3 ****
  --- 1,8 ----
  +   *) Add AddHandler command, which allows content-type-independent 
  +      "handlers" to be defined for file extensions. These can be either
  +      built into Apache (such as CGI scripts or server-side includes, or
  +      added with the Action command). [Alexei Kosut]
  + 
      *) Added new Explain() function, intended to help trace execution. Currently
         only used in mod_proxy.c (and there not yet complete). Switch it on with
         -DEXPLAIN. See explain.h. [Ben Laurie]
  ***************
  *** 11,17 ****
         sent by some (but not all) new web browsers (e.g. Netscape 2.0). Those
         that do not support it will get the default documents. More names or
         name patters can be added using the ScriptAlias directive, e.g.
  !      "ScriptAlias foo.bar.net *.foo.com foo.com"
    
      *) Added Status module with preliminary documentation available
         http://www.apache.org/docs/1.1/mod_status.html
  --- 16,22 ----
         sent by some (but not all) new web browsers (e.g. Netscape 2.0). Those
         that do not support it will get the default documents. More names or
         name patters can be added using the ScriptAlias directive, e.g.
  !      "ScriptAlias foo.bar.net *.foo.com foo.com" [Alexei Kosut]
    
      *) Added Status module with preliminary documentation available
         http://www.apache.org/docs/1.1/mod_status.html
  
  
  
  1.4       +24 -6     apache/src/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_request.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -C3 -r1.3 -r1.4
  *** http_request.c	1996/03/01 03:01:06	1.3
  --- http_request.c	1996/03/31 01:06:59	1.4
  ***************
  *** 563,573 ****
    	    r->no_cache = 1;	/* Do NOT send USE_LOCAL_COPY for
    				 * error documents!
    				 */
  ! 		/* This redirect needs to be a GET no matter what the original
  ! 		 * method was.
  ! 		 */
  ! 		r->method = pstrdup(r->pool, "GET");
  ! 		r->method_number = M_GET;
    	    internal_redirect (custom_response, r);
    	    return;
    	} else {
  --- 563,573 ----
    	    r->no_cache = 1;	/* Do NOT send USE_LOCAL_COPY for
    				 * error documents!
    				 */
  ! 	    /* This redirect needs to be a GET no matter what the original
  ! 	     * method was.
  ! 	     */
  ! 	    r->method = pstrdup(r->pool, "GET");
  ! 	    r->method_number = M_GET;
    	    internal_redirect (custom_response, r);
    	    return;
    	} else {
  ***************
  *** 690,696 ****
        return new;
    }
    
  ! void internal_redirect (char *new_uri, request_rec *r)
    {
        request_rec *new = (request_rec *)pcalloc(r->pool, sizeof(request_rec));
        char t[10];			/* Long enough... */
  --- 690,696 ----
        return new;
    }
    
  ! request_rec *internal_internal_redirect (char *new_uri, request_rec *r)
    {
        request_rec *new = (request_rec *)pcalloc(r->pool, sizeof(request_rec));
        char t[10];			/* Long enough... */
  ***************
  *** 736,741 ****
  --- 736,759 ----
        sprintf (t, "%d", r->status);
        table_set (new->subprocess_env, "REDIRECT_STATUS", pstrdup (r->pool, t));
    
  +     return new;
  + }
  + 
  + void internal_redirect (char *new_uri, request_rec *r)
  + {
  +     request_rec *new = internal_internal_redirect(new_uri, r);
        process_request_internal (new);
    }
    
  + /* This function is designed for things like actions or CGI scripts, when
  +  * using AddHandler, and you want to preserve the content type across
  +  * an internal redirect.
  +  */
  + 
  + void internal_redirect_handler (char *new_uri, request_rec *r)
  + {
  +     request_rec *new = internal_internal_redirect(new_uri, r);
  +     if (r->handler)
  +         new->content_type = r->content_type;
  +     process_request_internal (new);
  + }
  
  
  
  1.3       +1 -0      apache/src/http_request.h
  
  Index: http_request.h
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_request.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -C3 -r1.2 -r1.3
  *** http_request.h	1996/02/22 11:46:51	1.2
  --- http_request.h	1996/03/31 01:06:59	1.3
  ***************
  *** 84,89 ****
  --- 84,90 ----
     */
    
    void internal_redirect (char *new_uri, request_rec *);     
  + void internal_redirect_handler (char *new_uri, request_rec *);
    
    #ifdef CORE_PRIVATE
    /* Function called by main.c to handle first-level request */
  
  
  
  1.14      +0 -1      apache/src/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /export/home/cvs/apache/src/httpd.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -C3 -r1.13 -r1.14
  *** httpd.h	1996/03/30 07:16:42	1.13
  --- httpd.h	1996/03/31 01:07:00	1.14
  ***************
  *** 252,258 ****
    #define MAP_FILE_MAGIC_TYPE "application/x-type-map"
    #define ASIS_MAGIC_TYPE "httpd/send-as-is"
    #define DIR_MAGIC_TYPE "httpd/unix-directory"
  - #define PROXY_MAGIC_TYPE "httpd/proxy"
    
    /* Just in case your linefeed isn't the one the other end is expecting. */
    #define LF 10
  --- 252,257 ----
  
  
  
  1.2       +5 -4      apache/src/mod_actions.c
  
  Index: mod_actions.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_actions.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -C3 -r1.1 -r1.2
  *** mod_actions.c	1996/02/22 11:46:53	1.1
  --- mod_actions.c	1996/03/31 01:07:00	1.2
  ***************
  *** 121,130 ****
    {
        action_dir_config *conf =
          (action_dir_config *)get_module_config(r->per_dir_config,&action_module);
        char *t;
    
  !     if (!r->content_type ||
  ! 	!(t = table_get(conf->action_types,  r->content_type)))
          return DECLINED;
    
        if (r->finfo.st_mode == 0) {
  --- 121,131 ----
    {
        action_dir_config *conf =
          (action_dir_config *)get_module_config(r->per_dir_config,&action_module);
  +     char *action = r->handler ? r->handler : r->content_type;
        char *t;
    
  !     if (!action ||
  ! 	!(t = table_get(conf->action_types, action)))
          return DECLINED;
    
        if (r->finfo.st_mode == 0) {
  ***************
  *** 132,139 ****
          return NOT_FOUND;
        }
    
  !     internal_redirect(pstrcat(r->pool, t, escape_uri(r->pool, r->uri),
  ! 			      r->args ? "?" : NULL, r->args, NULL), r);
        return OK;
    }
    
  --- 133,140 ----
          return NOT_FOUND;
        }
    
  !     internal_redirect_handler(pstrcat(r->pool, t, escape_uri(r->pool, r->uri),
  ! 				      r->args ? "?" : NULL, r->args, NULL), r);
        return OK;
    }
    
  
  
  
  1.4       +9 -15     apache/src/mod_alias.c
  
  Index: mod_alias.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_alias.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -C3 -r1.3 -r1.4
  *** mod_alias.c	1996/03/05 17:28:49	1.3
  --- mod_alias.c	1996/03/31 01:07:00	1.4
  ***************
  *** 66,72 ****
    typedef struct {
        char *real;
        char *fake;
  !     char *forced_type;
    } alias_entry;
    
    typedef struct {
  --- 66,72 ----
    typedef struct {
        char *real;
        char *fake;
  !     char *handler;
    } alias_entry;
    
    typedef struct {
  ***************
  *** 107,113 ****
    
        /* XX r can NOT be relative to DocumentRoot here... compat bug. */
        
  !     new->fake = f; new->real = r; new->forced_type = cmd->info;
        return NULL;
    }
    
  --- 107,113 ----
    
        /* XX r can NOT be relative to DocumentRoot here... compat bug. */
        
  !     new->fake = f; new->real = r; new->handler = cmd->info;
        return NULL;
    }
    
  ***************
  *** 127,133 ****
    command_rec alias_cmds[] = {
    { "Alias", add_alias, NULL, RSRC_CONF, TAKE2, 
        "a fakename and a realname"},
  ! { "ScriptAlias", add_alias, CGI_MAGIC_TYPE, RSRC_CONF, TAKE2, 
        "a fakename and a realname"},
    { "Redirect", add_redirect, NULL, OR_FILEINFO, TAKE2, 
        "a document to be redirected, then the destination URL" },
  --- 127,133 ----
    command_rec alias_cmds[] = {
    { "Alias", add_alias, NULL, RSRC_CONF, TAKE2, 
        "a fakename and a realname"},
  ! { "ScriptAlias", add_alias, "cgi-script", RSRC_CONF, TAKE2, 
        "a fakename and a realname"},
    { "Redirect", add_redirect, NULL, OR_FILEINFO, TAKE2, 
        "a document to be redirected, then the destination URL" },
  ***************
  *** 178,186 ****
            int l = alias_matches (r->uri, p->fake);
    
            if (l > 0) {
  ! 	    if (p->forced_type)
  ! 		table_set (r->notes, "alias-forced-type", p->forced_type);
  ! 			   
    	    if (doesc) {
    		char *escurl;
    		escurl = os_escape_path(r->pool, r->uri + l, 1);
  --- 178,188 ----
            int l = alias_matches (r->uri, p->fake);
    
            if (l > 0) {
  ! 	    if (p->handler) { /* Set handler, and leave a note for mod_cgi */
  ! 	        r->handler = pstrdup(r->pool, p->handler);
  ! 		table_set (r->notes, "alias-forced-type", p->handler);
  ! 	    }
  ! 
    	    if (doesc) {
    		char *escurl;
    		escurl = os_escape_path(r->pool, r->uri + l, 1);
  ***************
  *** 238,251 ****
        return DECLINED;
    }
    
  - int type_forced_alias (request_rec *r)
  - {
  -     char *t = table_get (r->notes, "alias-forced-type");
  -     if (!t) return DECLINED;
  -     r->content_type = t;
  -     return OK;
  - }
  - 
    module alias_module = {
       STANDARD_MODULE_STUFF,
       NULL,			/* initializer */
  --- 240,245 ----
  ***************
  *** 259,265 ****
       NULL,			/* check_user_id */
       NULL,			/* check auth */
       NULL,			/* check access */
  !    type_forced_alias,		/* type_checker */
       fixup_redir,			/* fixups */
       NULL				/* logger */
    };
  --- 253,259 ----
       NULL,			/* check_user_id */
       NULL,			/* check auth */
       NULL,			/* check access */
  !    NULL,			/* type_checker */
       fixup_redir,			/* fixups */
       NULL				/* logger */
    };
  
  
  
  1.3       +1 -0      apache/src/mod_asis.c
  
  Index: mod_asis.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_asis.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -C3 -r1.2 -r1.3
  *** mod_asis.c	1996/02/22 11:46:54	1.2
  --- mod_asis.c	1996/03/31 01:07:01	1.3
  ***************
  *** 87,92 ****
  --- 87,93 ----
    
    handler_rec asis_handlers[] = {
    { ASIS_MAGIC_TYPE, asis_handler },
  + { "send-as-is", asis_handler },
    { NULL }
    };
    
  
  
  
  1.6       +3 -2      apache/src/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_cgi.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -C3 -r1.5 -r1.6
  *** mod_cgi.c	1996/03/18 01:55:39	1.5
  --- mod_cgi.c	1996/03/31 01:07:01	1.6
  ***************
  *** 83,89 ****
    int is_scriptaliased (request_rec *r)
    {
        char *t = table_get (r->notes, "alias-forced-type");
  !     return t && (!strcmp (t, CGI_MAGIC_TYPE));
    }
    
    /****************************************************************
  --- 83,89 ----
    int is_scriptaliased (request_rec *r)
    {
        char *t = table_get (r->notes, "alias-forced-type");
  !     return t && (!strcmp (t, "cgi-script"));
    }
    
    /****************************************************************
  ***************
  *** 346,352 ****
    	    r->method = pstrdup(r->pool, "GET");
    	    r->method_number = M_GET;
    
  ! 	    internal_redirect (location, r);
    	    return OK;
            }
    	else if (location && r->status == 200) {
  --- 346,352 ----
    	    r->method = pstrdup(r->pool, "GET");
    	    r->method_number = M_GET;
    
  ! 	    internal_redirect_handler (location, r);
    	    return OK;
            }
    	else if (location && r->status == 200) {
  ***************
  *** 376,381 ****
  --- 376,382 ----
    
    handler_rec cgi_handlers[] = {
    { CGI_MAGIC_TYPE, cgi_handler },
  + { "cgi-script", cgi_handler },
    { NULL }
    };
    
  
  
  
  1.5       +1 -0      apache/src/mod_imap.c
  
  Index: mod_imap.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_imap.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -C3 -r1.4 -r1.5
  *** mod_imap.c	1996/03/01 03:10:50	1.4
  --- mod_imap.c	1996/03/31 01:07:01	1.5
  ***************
  *** 771,776 ****
  --- 771,777 ----
    
    handler_rec imap_handlers[] = {
    { IMAP_MAGIC_TYPE, imap_handler },
  + { "imap-file", imap_handler },
    { NULL }
    };
    
  
  
  
  1.6       +9 -4      apache/src/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_include.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -C3 -r1.5 -r1.6
  *** mod_include.c	1996/03/20 02:55:18	1.5
  --- mod_include.c	1996/03/31 01:07:02	1.6
  ***************
  *** 820,827 ****
    	return FORBIDDEN;
        }
        
  -     r->content_type = "text/html";
  -     
        hard_timeout ("send", r);
        send_http_header(r);
    
  --- 820,825 ----
  ***************
  *** 852,857 ****
  --- 850,861 ----
        return OK;
    }
    
  + int send_shtml_file (request_rec *r)
  + {
  +     r->content_type = "text/html";
  +     return send_parsed_file(r);
  + }
  + 
    int xbithack_handler (request_rec *r)
    {
        enum xbithack *state;
  ***************
  *** 877,884 ****
    };
    
    handler_rec includes_handlers[] = {
  ! { INCLUDES_MAGIC_TYPE, send_parsed_file },
  ! { INCLUDES_MAGIC_TYPE3, send_parsed_file },
    { "text/html", xbithack_handler },
    { NULL }
    };
  --- 881,889 ----
    };
    
    handler_rec includes_handlers[] = {
  ! { INCLUDES_MAGIC_TYPE, send_shtml_file },
  ! { INCLUDES_MAGIC_TYPE3, send_shtml_file },
  ! { "server-parsed", send_parsed_file },
    { "text/html", xbithack_handler },
    { NULL }
    };
  
  
  
  1.5       +18 -0     apache/src/mod_mime.c
  
  Index: mod_mime.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_mime.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -C3 -r1.4 -r1.5
  *** mod_mime.c	1996/03/23 05:16:53	1.4
  --- mod_mime.c	1996/03/31 01:07:02	1.5
  ***************
  *** 68,73 ****
  --- 68,74 ----
        table *forced_types;	/* Additional AddTyped stuff */
        table *encoding_types;	/* Added with AddEncoding... */
        table *language_types;	/* Added with AddLanguage... */
  +     table *handlers;		/* Added with AddHandler...  */
    } mime_dir_config;
    
    module mime_module;
  ***************
  *** 80,85 ****
  --- 81,87 ----
        new->forced_types = make_table (p, 4);
        new->encoding_types = make_table (p, 4);
        new->language_types = make_table (p, 4);
  +     new->handlers = make_table (p, 4);
        
        return new;
    }
  ***************
  *** 97,102 ****
  --- 99,106 ----
    					  base->encoding_types);
        new->language_types = overlay_tables (p, add->language_types,
    					  base->language_types);
  +     new->handlers = overlay_tables (p, add->handlers,
  + 					  base->handlers);
    
        return new;
    }
  ***************
  *** 122,127 ****
  --- 126,138 ----
        return NULL;
    }
    
  + char *add_handler(cmd_parms *cmd, mime_dir_config *m, char *hdlr, char *ext)
  + {
  +     if (*ext == '.') ++ext;
  +     table_set (m->handlers, ext, hdlr);
  +     return NULL;
  + }
  + 
    /* The sole bit of server configuration that the MIME module has is
     * the name of its config file, so...
     */
  ***************
  *** 140,145 ****
  --- 151,158 ----
        "an encoding (e.g., gzip), followed by one or more file extensions" },
    { "AddLanguage", add_language, NULL, OR_FILEINFO, ITERATE2,
        "a language (e.g., fr), followed by one or more file extensions" },
  + { "AddHandler", add_handler, NULL, OR_FILEINFO, ITERATE2,
  +     "a handler name followed by one or more file extensions" },
    { "TypesConfig", set_types_config, NULL, RSRC_CONF, TAKE1,
        "the MIME types config file" },
    { NULL }
  ***************
  *** 217,222 ****
  --- 230,240 ----
          /* Check for Content-Encoding */
          if ((type = table_get (conf->encoding_types, ext)))
    	  r->content_encoding = type;
  + 
  +       /* Check for a special handler, but not for proxy request */
  +       if ((type = table_get (conf->handlers, ext)) && !r->proxyreq)
  + 	  r->handler = type;
  + 
        }
    
        return OK;
  
  
  
  1.3       +3 -1      apache/src/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_negotiation.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -C3 -r1.2 -r1.3
  *** mod_negotiation.c	1996/02/22 11:47:12	1.2
  --- mod_negotiation.c	1996/03/31 01:07:03	1.3
  ***************
  *** 669,675 ****
    	 * we're building...
    	 */
    
  ! 	if (!strcmp (sub_req->content_type, MAP_FILE_MAGIC_TYPE)) {
    	    closedir(dirp);
    	    
    	    neg->avail_vars->nelts = 0;
  --- 669,676 ----
    	 * we're building...
    	 */
    
  ! 	if (!strcmp (sub_req->content_type, MAP_FILE_MAGIC_TYPE) ||
  ! 	    !strcmp (sub_req->handler, "type-map")) {
    	    closedir(dirp);
    	    
    	    neg->avail_vars->nelts = 0;
  ***************
  *** 1117,1122 ****
  --- 1118,1124 ----
    
    handler_rec negotiation_handlers[] = {
    { MAP_FILE_MAGIC_TYPE, handle_map_file },
  + { "type-map", handle_map_file },
    { NULL }
    };
    
  
  
  
  1.16      +3 -18     apache/src/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_proxy.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -C3 -r1.15 -r1.16
  *** mod_proxy.c	1996/03/31 00:03:00	1.15
  --- mod_proxy.c	1996/03/31 01:07:03	1.16
  ***************
  *** 255,260 ****
  --- 255,261 ----
    	if (!conf->req) return DECLINED;
    	
    	r->filename = pstrcat(r->pool, "proxy:", r->uri, NULL);
  + 	r->handler = "proxy-server";
    	return OK;
        } else
        {
  ***************
  *** 732,753 ****
    }
    
    
  - 
  - /* -------------------------------------------------------------- */
  - /* Set handler */
  - 
  - 
  - static int
  - proxy_type(request_rec *r)
  - {
  -     if (strncmp(r->filename, "proxy:", 6) == 0)
  -     {
  - 	r->content_type = PROXY_MAGIC_TYPE;
  - 	return OK;
  -     } else
  - 	return DECLINED;
  - }
  - 
    /* -------------------------------------------------------------- */
    /* Invoke handler */
    
  --- 733,738 ----
  ***************
  *** 2815,2821 ****
    }
    
    static handler_rec proxy_handlers[] = {
  ! { PROXY_MAGIC_TYPE, proxy_handler },
    { NULL }
    };
    
  --- 2800,2806 ----
    }
    
    static handler_rec proxy_handlers[] = {
  ! { "proxy-server", proxy_handler },
    { NULL }
    };
    
  ***************
  *** 3043,3049 ****
       NULL,			/* check_user_id */
       NULL,			/* check auth */
       NULL,			/* check access */
  !    proxy_type,			/* type_checker */
       proxy_fixup,			/* pre-run fixups */
       NULL				/* logger */
    };
  --- 3028,3034 ----
       NULL,			/* check_user_id */
       NULL,			/* check auth */
       NULL,			/* check access */
  !    NULL,			/* type_checker */
       proxy_fixup,			/* pre-run fixups */
       NULL				/* logger */
    };
  
  
  





Mime
View raw message