martin      98/09/14 09:22:33

  Modified:    src/os/bs2000 os.c
               src/modules/proxy proxy_connect.c
  Log:
  Undo last patch: the commit message was bogus
  
  Revision  Changes    Path
  1.10      +10 -15    apache-1.3/src/os/bs2000/os.c
  
  Index: os.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/os/bs2000/os.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- os.c      1998/09/14 16:12:18     1.9
  +++ os.c      1998/09/14 16:22:24     1.10
  @@ -61,14 +61,12 @@
    */
   
   #include "httpd.h"
  -#include "http_core.h"
   #include "os.h"
   
   /* Check the Content-Type to decide if conversion is needed */
   int ap_checkconv(struct request_rec *r)
   {
       int convert_to_ascii;
  -    const char *type;
   
       /* To make serving of "raw ASCII text" files easy (they serve faster 
        * since they don't have to be converted from EBCDIC), a new
  @@ -78,24 +76,21 @@
        * set a flag that translation is required later on.
        */
   
  -    type = (r->content_type == NULL) ? ap_default_type(r) : r->content_type;
  -
       /* If no content type is set then treat it as (ebcdic) text/plain */
  -    convert_to_ascii = (type == NULL);
  +    convert_to_ascii = (r->content_type == NULL);
   
       /* Conversion is applied to text/ files only, if ever. */
  -    if (type && (strncasecmp(type, "text/", 5) == 0 ||
  -              strncasecmp(type, "message/", 8) == 0)) {
  -     if (strncasecmp(type, ASCIITEXT_MAGIC_TYPE_PREFIX,
  -                     sizeof(ASCIITEXT_MAGIC_TYPE_PREFIX)-1) == 0)
  -         r->content_type = ap_pstrcat(r->pool, "text/",
  -                                      
type+sizeof(ASCIITEXT_MAGIC_TYPE_PREFIX)-1,
  -                                      NULL);
  +    if (r->content_type &&
  +     (strncmp(r->content_type, "text/", 5) == 0
  +     || strncmp(r->content_type, "message/", 8) == 0)) {
  +        if (strncmp(r->content_type, ASCIITEXT_MAGIC_TYPE_PREFIX, 
  +        sizeof(ASCIITEXT_MAGIC_TYPE_PREFIX)-1) == 0)
  +        r->content_type = ap_pstrcat(r->pool, "text/",
  +        r->content_type+sizeof(ASCIITEXT_MAGIC_TYPE_PREFIX)-1, NULL);
           else
  -         /* translate EBCDIC to ASCII */
  -         convert_to_ascii = 1;
  +        /* translate EBCDIC to ASCII */
  +        convert_to_ascii = 1;
       }
  -    /* Enable conversion if it's a text document */
       ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, convert_to_ascii);
   
       return convert_to_ascii;
  
  
  
  1.34      +2 -2      apache-1.3/src/modules/proxy/proxy_connect.c
  
  Index: proxy_connect.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/proxy_connect.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- proxy_connect.c   1998/09/14 16:12:14     1.33
  +++ proxy_connect.c   1998/09/14 16:22:28     1.34
  @@ -159,10 +159,10 @@
            case DEFAULT_SNEWS_PORT:
                break;
            default:
  -             return HTTP_FORBIDDEN;
  +             return HTTP_SERVICE_UNAVAILABLE;
        }
       } else if(!allowed_port(conf, port))
  -     return HTTP_FORBIDDEN;
  +     return HTTP_SERVICE_UNAVAILABLE;
   
       if (proxyhost) {
        Explain2("CONNECT to remote proxy %s on port %d", proxyhost, proxyport);
  
  
  

Reply via email to