You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Dean Gaudet <dg...@hyperreal.com> on 1997/03/10 10:19:40 UTC

cvs commit: apache/src http_config.c

dgaudet     97/03/10 01:19:40

  Modified:    src       http_config.c
  Log:
  PR#160: invoke_handler() doesn't handle mime arguments in content-type
  
  Submitted: Petr Lampa
  Reviewed: Dean, Randy, Chuck, Jim
  
  Revision  Changes    Path
  1.43      +7 -1      apache/src/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/http_config.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -C3 -r1.42 -r1.43
  *** http_config.c	1997/01/26 01:15:11	1.42
  --- http_config.c	1997/03/10 09:19:39	1.43
  ***************
  *** 314,320 ****
       module *modp;
       handler_rec *handp;
       char *content_type = r->content_type ? r->content_type : default_type (r);
  !    char *handler = r->handler ? r->handler : content_type;
      
       /* Pass one --- direct matches */
       
  --- 314,326 ----
       module *modp;
       handler_rec *handp;
       char *content_type = r->content_type ? r->content_type : default_type (r);
  !    char *handler, *p; 
  ! 
  !    if ((p = strchr(content_type, ';')) != NULL) {  /* MIME type arguments */
  !        while (p > content_type && p[-1] == ' ') --p; /* strip trailing spaces */
  !        content_type = pstrndup(r->pool, content_type, p - content_type);
  !    }
  !    handler = r->handler ? r->handler : content_type;
      
       /* Pass one --- direct matches */