httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject cvs commit: apache-1.3/src/support ab.c
Date Fri, 09 Mar 2001 10:10:57 GMT
martin      01/03/09 02:10:56

  Modified:    conf     httpd.conf-dist
               htdocs/manual ebcdic.html
               htdocs/manual/mod core.html directives.html
               src      CHANGES
               src/ap   Makefile.tmpl ap_base64.c ap_md5c.c ap_sha1.c
               src/include http_core.h httpd.h
               src/main http_core.c http_protocol.c http_request.c
               src/modules/example mod_example.c
               src/modules/proxy proxy_ftp.c
               src/modules/standard mod_autoindex.c mod_cgi.c mod_imap.c
                        mod_info.c mod_status.c
               src/modules/test mod_rndchunk.c mod_test_util_uri.c
               src/os/bs2000 Makefile.tmpl ebcdic.c ebcdic.h os.c os.h
               src/os/os390 Makefile.tmpl ebcdic.c ebcdic.h os.c os.h
               src/os/tpf Makefile.tmpl ebcdic.c ebcdic.h os.c os.h
               src/support ab.c
  Added:       src/ap   ap_ebcdic.c
               src/include ap_ebcdic.h
  Log:
  I added configurable EBCDIC configuration functionality to http_core.c;
  because conversion is a base feature, this looked like the only sensible
  place to me. Other basic features like Resource limits live there too.
  
  * make EBCDIC conversion truly configurable. Up to know, there was a
    hardwired assumption that only files of MIME type text/* (and a few
    exceptions) could be EBCDIC files; and everything else HAD TO BE
    binary. This assumption breaks (again and again) for MIME types like
    application/postscript, model/vrml, application/x-javascript and
    others, which can never be stored as EBCDIC text files.
    I now implemented two new directives for defining the conversion
    based on MIME type or file extension. The conversion can be set for
    upload and download independently, on or off, for any file.
  
  * make EBCDIC conversion symmetric. Up to now, there was no clean way
    to deal with uploaded content (POST with Content-Type:, PUT with
    Content-Type:) because a) there was no MIME checker attached to the
    header-reader, and b) you could not actually define a conversion
    based on MIME type. Both deficiencies have now been addressed (the
    ap_checkconv_in() routine is called upon parsing of an uploaded
    Content-Type: line, and it can set a flag which is different from
    the download conversion flag. Also, its change is triggered at a
    different phase in the request handling: the upload conversion
    is set as soon as a Content-Type: for an uploaded document is
    detected, but the download conversion is only set when the
    response is about to be returned). All this was impossible in the
    past.
  
  * unify the EBCDIC tables to be in a single common file
    src/ap/ap_ebcdic.c (and src/include/ap_ebcdic.h) instead
    of having redundant copies under src/os/{tpf,bs2000,os390}/ebcdic.{c,h}
    The common file will have the correct translation table
    conditionally compiled based on #ifdef TPF/OS390/_OSD_POSIX.
    Up to now, each EBCDIC had its own copy, cloned and slightly
    adapted.
  
  * Also, put the conversion checker ap_checkconv() to http_core,
    because is is an essential central cog in the whole conversion
    clockwork. Until now, three almost incompatible copies were
    spread throughout the EBCDIC platforms' os.c files.
  
  Reviewed by:	"David McCreedy" <mccreedy@us.ibm.com>
  
  Revision  Changes    Path
  1.69      +23 -0     apache-1.3/conf/httpd.conf-dist
  
  Index: httpd.conf-dist
  ===================================================================
  RCS file: /home/cvs/apache-1.3/conf/httpd.conf-dist,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -u -r1.68 -r1.69
  --- httpd.conf-dist	2001/02/22 03:48:15	1.68
  +++ httpd.conf-dist	2001/03/09 10:09:40	1.69
  @@ -499,6 +499,29 @@
   #
   ServerSignature On
   
  +# EBCDIC configuration:
  +# (only for mainframes using the EBCDIC codeset, currently one of:
  +# Fujitsu-Siemens' BS2000/OSD, IBM's OS/390 and IBM's TPF)!!
  +# The following default configuration assumes that "text files"
  +# are stored in EBCDIC (so that you can operate on them using the
  +# normal POSIX tools like grep and sort) while "binary files" are
  +# stored with identical octets as on an ASCII machine.
  +#
  +# The directives are evaluated in configuration file order, with
  +# the EBCDICConvert directives applied before EBCDICConvertByType.
  +#
  +# If you want to have ASCII HTML documents and EBCDIC HTML documents
  +# at the same time, you can use the file extension to force
  +# conversion off for the ASCII documents:
  +# > AddType       text/html .ahtml
  +# > EBCDICConvert Off=InOut .ahtml
  +#
  +# EBCDICConvertByType  On=InOut text/* message/* multipart/*
  +# EBCDICConvertByType  On=In    application/x-www-form-urlencoded
  +# EBCDICConvertByType  On=InOut application/postscript model/vrml
  +# EBCDICConvertByType Off=InOut */*
  +
  +
   #
   # Aliases: Add here as many aliases as you need (with no limit). The format is 
   # Alias fakename realname
  
  
  
  1.10      +78 -335   httpd-docs-1.3/htdocs/manual/ebcdic.html
  
  Index: ebcdic.html
  ===================================================================
  RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/ebcdic.html,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -u -r1.9 -r1.10
  --- ebcdic.html	2000/11/22 20:47:59	1.9
  +++ ebcdic.html	2001/03/09 10:09:47	1.10
  @@ -17,12 +17,14 @@
   
    <P>
     Version 1.3 of the Apache HTTP Server is the first version which
  -  includes a port to a (non-ASCII) mainframe machine which uses
  -  the EBCDIC character set as its native codeset.<BR>
  -  (It is the SIEMENS family of mainframes running the
  -  <A HREF="http://www.siemens.de/servers/bs2osd/osdbc_us.htm">BS2000/OSD
  -  operating system</A>. This mainframe OS nowadays features a
  -  SVR4-derived POSIX subsystem).
  +  includes a port to (non-ASCII) mainframe machines which use
  +  the EBCDIC character set as their native codeset.<BR>
  +  (Initially, that support covered only the Fujitsu-Siemens family of
  +  mainframes running the
  +  <A HREF="http://www.fujitsu-siemens.com/servers/bs2osd/osdbc_us.htm">BS2000/OSD
  +  operating system</A>, a mainframe OS which features a
  +  SVR4-derived POSIX subsystem. Later, the two IBM mainframe operating
  +  systems TPF and OS/390 were added).
    </P>
   
    <P>
  @@ -54,40 +56,60 @@
     a configurable method to define whether a HTML document was stored
     in ASCII (the only format accepted by the old server) or in EBCDIC
     (the native document format in the POSIX subsystem, and therefore
  -  the only realistic format in which the other POSIX tools like grep
  -  or sed could operate on the documents). The current solution to
  -  this is a "pseudo-MIME-format" which is intercepted and
  -  interpreted by the Apache server (see below). Future versions
  -  might solve the problem by defining an "ebcdic-handler" for all
  -  documents which must be converted.
  +  the only sensible format in which the other POSIX tools like grep
  +  or sed could operate on documents). Later, special EBCDIC conversion
  +  directives were added which allow for the flexible definition of
  +  conversion rules based on the documents' MIME type or file extension.
    </P>
   
    <H2 ALIGN=CENTER>Technical Solution</H2>
    <P>
     Since all Apache input and output is based upon the BUFF data type
  -  and its methods, the easiest solution was to add the conversion to
  -  the BUFF handling routines. The conversion must be settable at any
  -  time, so a BUFF flag was added which defines whether a BUFF object
  -  has currently enabled conversion or not. This flag is modified at
  +  and its methods, the easiest solution was to add the actual
  +  conversion to the BUFF handling routines. The conversion must be
  +  settable at any time, so BUFF flags were added which define
  +  whether a BUFF object has currently enabled conversion or not.
  +  Two such flags exist: one for data read from the client
  +  (ASCII to EBCDIC conversion) and one for data returned to the
  +  client (EBCDIC to ASCII conversion).
  + </P>
  + <P>
  +  During sending of the header, Apache determines (based on the
  +  returned MIME type for the request) whether conversion should be used
  +  or the document returned unconverted. It uses this decision to
  +  initialize the BUFF flag when the response output begins.
  +  Modules should therefore determine the MIME type for the
  +  current request before initiating the response by calling
  +  ap_send_http_headers().
  + </P>
  + <P>
  +  The BUFF flag is modified at
     several points in the HTTP protocol:
    </P>
   
     <UL>
  -   <LI><STRONG>set</STRONG> before a request is received (because the
  -       request and the request header lines are always in ASCII
  -       format)
  +   <LI><STRONG>set</STRONG> (In and Out) before a request is
  +       received (because the request and the request header
  +       lines are always in ASCII format)
   
  -   <LI><STRONG>set/unset</STRONG> when the request body is
  +   <LI><STRONG>set/unset</STRONG> (for Input data) when the request body is
          received - depending on the content type of the request body
          (because the request body may contain ASCII text or a binary file)
   
  -   <LI><STRONG>set</STRONG> before a reply header is sent (because the
  -       response header lines are always in ASCII format)
  -
  -   <LI><STRONG>set/unset</STRONG> when the response body is
  -       sent - depending on the content type of the response body
  -       (because the response body may contain text or a binary file)
  +   <LI><STRONG>set</STRONG> (for returned Output) before a response
  +       header is sent (because the response header lines are always
  +       in ASCII format)
  +
  +   <LI><STRONG>set/unset</STRONG> (for returned Output) when the
  +       response body is sent - depending on the content type of the
  +       response body (because the response body may contain text or
  +       a binary file)
     </UL>
  +  Additional transparent transitions may occur for extracting/inserting
  +  the HTTP/1.1 chunking information from/into the input/output body data
  +  stream, and for generating <EM>multipart</EM> headers for <EM>range</EM>
  +  requests. (See RFC2616 and src/main/http_protocol.c for details.)
  +
   
   <H2 ALIGN=CENTER>Porting Notes</H2>
   
  @@ -102,11 +124,11 @@
   	contiguity of the two character sets, flags which
   	indicate which part of the HTTP protocol has to be
   	converted and which part doesn't <EM>etc.</EM>
  -    <DT><CODE><STRONG>#ifdef _OSD_POSIX</STRONG></CODE>
  -    <DD>Code which is needed for the SIEMENS BS2000/OSD
  -	mainframe platform only. This deals with include file
  -	differences and socket implementation topics which are
  -	only required on the BS2000/OSD platform.
  +    <DT><CODE><STRONG>#ifdef _OSD_POSIX | TPF | OS390</STRONG></CODE>
  +    <DD>Code which is needed for the Fujitsu-Siemens BS2000/OSD | IBM TPF |
  +        IBM OS390 mainframe platforms only. This deals with include file
  +	differences and socket and fork implementation topics which are
  +	only required on the respective platform.
      <BR>
      </DL>
      </LI>
  @@ -129,26 +151,17 @@
       (In the case of text files of course, provisions must be made so
       that EBCDIC documents are always served in ASCII)
      <BR>
  -   </LI>
  -
  -   <LI>
       This port therefore features a built-in protocol level conversion
       for the server-internal strings (which the compiler translated to
       EBCDIC strings) and thus for all server-generated documents.
  -    The hard coded ASCII escapes \012 and \015 which are
  -    ubiquitous in the server code are an exception: they are
  -    already the binary encoding of the ASCII \n and \r and must
  -    not be converted to ASCII a second time. This exception is
  -    only relevant for server-generated strings; and <EM>external</EM>
  -    EBCDIC documents are not expected to contain ASCII newline characters.
      <BR>
      </LI>
   
      <LI>
       By examining the call hierarchy for the BUFF management
       routines, I added an "ebcdic/ascii conversion layer" which
  -    would be crossed on every puts/write/get/gets, and a
  -    conversion flag which allowed enabling/disabling the
  +    would be crossed on every puts/write/get/gets, and
  +    conversion flags which allowed enabling/disabling the
       conversions on-the-fly. Usually, a document crosses this
       layer twice from its origin source (a file or CGI output) to
       its destination (the requesting client): <SAMP>file -&gt;
  @@ -166,45 +179,43 @@
      </LI>
   
      <LI>
  -    For Text documents (MIME types text/plain, text/html <EM>etc.</EM>),
  -    an implicit translation to ASCII can be used, or (if the
  -    users prefer to store some documents in raw ASCII form for
  -    faster serving, or because the files reside on a NFS-mounted
  -    directory tree) can be served without conversion.
  -    <BR>
  -    <STRONG>Example:</STRONG><BLOCKQUOTE>
  -	to serve files with the suffix .ahtml as a raw ASCII text/html
  -	document without implicit conversion (and suffix .ascii
  -	as ASCII text/plain), use the directives:<PRE>
  -      AddType  text/x-ascii-html  .ahtml
  -      AddType  text/x-ascii-plain .ascii
  -      </PRE></BLOCKQUOTE>
  -    Similarly, any text/XXXX MIME type can be served as "raw ASCII" by
  -    configuring a MIME type "text/x-ascii-XXXX" for it using AddType.
  +    By default, Apache assumes that documents with the MIME types
  +    "text/*", "message/*", "multipart/*" and "application/x-www-form-urlencoded"
  +    are text documents and are stored as EBCDIC files, whereas all
  +    other files are binary files (and stored in a byte-identical
  +    encoding as on an ASCII machine).<BR>
  +    These defaults <A HREF="mod/core.html#ebcdic">can be overridden</A>
  +    on a by-MIME-type and/or by-file-extension basis, using the
  +    directives<PRE>
  +     <A HREF="mod/core.html#ebcdicconvertbytype">EBCDICConvertByType</A> {On|Off}[={In|Out|InOut}] <EM>mimetype</EM> [...]
  +     <A HREF="mod/core.html#ebcdicconvert">EBCDICConvert</A>       {On|Off}[={In|Out|InOut}] <EM>fileext</EM> [...]
  +    </PRE> where the <EM>mimetype</EM> argument may contain wildcards.
      <BR>
      </LI>
   
      <LI>
  -    Non-text documents are always served "binary" without conversion.
  -    This seems to be the most sensible choice for, .<EM>e.g.</EM>, GIF/ZIP/AU
  -    file types. This of course requires the user to copy them to the
  -    mainframe host using the "rcp -b" binary switch.
  +    Before adding the flexible conversion, non-text documents were
  +    always served "binary" without conversion.
  +    This seemed to be the most sensible choice for, .<EM>e.g.</EM>, GIF/ZIP/AU
  +    file types (It of course requires the user to copy them to the
  +    mainframe host using the "rcp -b" binary switch), but proved to be
  +    inadequate for MIME types like <SAMP>model/vrml</SAMP>,
  +    <SAMP>application/postscript</SAMP> and <SAMP>application/x-javascript</SAMP>.
      <BR>
      </LI>
   
      <LI>
       Server parsed files are always assumed to be in native (<EM>i.e.</EM>,
  -    EBCDIC) format as used on the machine, and are converted after
  -    processing.
  +    EBCDIC) format as used on the machine (because they do not cross the
  +    conversion layer when being read), and are converted after processing.
      <BR>
      </LI>
   
      <LI>
       For CGI output, the CGI script determines whether a conversion is
       needed or not: by setting the appropriate Content-Type, text files
  -    can be converted, or GIF output can be passed through unmodified.
  -    An example for the latter case is the wwwcount program which we ported
  -    as well.
  +    can be converted, or GIF output can be passed through unmodified
  +    (depending on the conversion configured in the script's context).
      <BR>
      </LI>
     </OL>
  @@ -212,13 +223,6 @@
    <H2 ALIGN=CENTER>Document Storage Notes</H2>
     <H3 ALIGN=CENTER>Binary Files</H3>
      <P>
  -    All files with a <SAMP>Content-Type:</SAMP> which does not
  -    start with <SAMP>text/</SAMP> are regarded as <EM>binary files</EM>
  -    by the server and are not subject to any conversion.
  -    Examples for binary files are GIF images, gzip-compressed
  -    files and the like.
  -   </P>
  -   <P>
       When exchanging binary files between the mainframe host and a
       Unix machine or Windows PC, be sure to use the ftp "binary"
       (<SAMP>TYPE I</SAMP>) command, or use the
  @@ -237,269 +241,8 @@
     <H3 ALIGN=CENTER>Server Side Included Documents</H3>
      <P>
       SSI documents must currently be stored in EBCDIC only. No
  -    provision is made to convert it from ASCII before processing.
  +    provision is made to convert them from ASCII before processing.
      </P>
  -
  - <H2 ALIGN=CENTER>Apache Modules' Status</H2>
  - <TABLE BORDER="1" ALIGN="middle">
  -  <TR>
  -   <TH>Module
  -   <TH>Status
  -   <TH>Notes
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>http_core
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_access
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_actions
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_alias
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_asis
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_auth
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_auth_anon
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_auth_db
  -   <TD ALIGN=CENTER>?
  -   <TD>with own libdb.a
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_auth_dbm
  -   <TD ALIGN=CENTER>?
  -   <TD>with own libdb.a
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_autoindex
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_cern_meta
  -   <TD ALIGN=CENTER>?
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_cgi
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_digest
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_dir
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_so
  -   <TD ALIGN=CENTER>-
  -   <TD>no shared libs
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_env
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_example
  -   <TD ALIGN=CENTER>-
  -   <TD>(test bed only)
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_expires
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_headers
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_imap
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_include
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_info
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_log_agent
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_log_config
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_log_referer
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_mime
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_mime_magic
  -   <TD ALIGN=CENTER>?
  -   <TD>not ported yet
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_negotiation
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_proxy
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_rewrite
  -   <TD ALIGN=CENTER>+
  -   <TD>untested
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_setenvif
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_speling
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_status
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_unique_id
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_userdir
  -   <TD ALIGN=CENTER>+
  -   <TD>
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT>mod_usertrack
  -   <TD ALIGN=CENTER>?
  -   <TD>untested
  -  </TR>
  - </TABLE>
  -
  - <H2 ALIGN=CENTER>Third Party Modules' Status</H2>
  - <TABLE BORDER="1" ALIGN="middle">
  -  <TR>
  -   <TH>Module
  -   <TH>Status
  -   <TH>Notes
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT><A HREF="http://java.apache.org/">mod_jserv</A>
  -   <TD ALIGN=CENTER>-
  -   <TD>JAVA still being ported.
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT><A HREF="http://www.php.net/">mod_php3</A>
  -   <TD ALIGN=CENTER>+
  -   <TD>mod_php3 runs fine, with LDAP and GD and FreeType libraries
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT
  -   ><A HREF="http://hpwww.ec-lyon.fr/~vincent/apache/mod_put.html">mod_put</A>
  -   <TD ALIGN=CENTER>?
  -   <TD>untested
  -  </TR>
  -
  -  <TR>
  -   <TD ALIGN=LEFT
  -   ><A HREF="ftp://hachiman.vidya.com/pub/apache/">mod_session</A>
  -   <TD ALIGN=CENTER>-
  -   <TD>untested
  -  </TR>
  -
  - </TABLE>
   
   <!--#include virtual="footer.html" -->
   </BODY>
  
  
  
  1.186     +370 -29   httpd-docs-1.3/htdocs/manual/mod/core.html
  
  Index: core.html
  ===================================================================
  RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/mod/core.html,v
  retrieving revision 1.185
  retrieving revision 1.186
  diff -u -u -r1.185 -r1.186
  --- core.html	2001/02/24 20:13:04	1.185
  +++ core.html	2001/03/09 10:09:55	1.186
  @@ -37,6 +37,9 @@
   <LI><A HREF="#directory">&lt;Directory&gt;</A>
   <LI><A HREF="#directorymatch">&lt;DirectoryMatch&gt;</A>
   <LI><A HREF="#documentroot">DocumentRoot</A>
  +<LI><A HREF="#ebcdicconvert">EBCDICConvert</A>
  +<LI><A HREF="#ebcdicconvertbytype">EBCDICConvertByType</A>
  +<LI><A HREF="#ebcdickludge">EBCDICKludge</A>
   <LI><A HREF="#errordocument">ErrorDocument</A>
   <LI><A HREF="#errorlog">ErrorLog</A>
   <LI><A HREF="#files">&lt;Files&gt;</A>
  @@ -139,8 +142,8 @@
   <A
    HREF="directive-dict.html#Syntax"
    REL="Help"
  -><STRONG>Syntax:</STRONG></A> AccessFileName <EM>filename</em>
  -[<em>filename</em>] ...<BR>
  +><STRONG>Syntax:</STRONG></A> AccessFileName <EM>filename</EM>
  +[<EM>filename</EM>] ...<BR>
   <A
    HREF="directive-dict.html#Default"
    REL="Help"
  @@ -180,7 +183,7 @@
   
   <H2><A NAME="adddefaultcharset">AddDefaultCharset directive</A></H2>
   <A HREF="directive-dict.html#Syntax" REL="Help"><STRONG>Syntax:</STRONG></A> 
  -AddDefaultCharset On|Off|<em>charset</em><BR>
  +AddDefaultCharset On|Off|<EM>charset</EM><BR>
   <A HREF="directive-dict.html#Context" REL="Help" ><STRONG>Context:</STRONG></A> 
   all<BR>
   <A HREF="directive-dict.html#Status" REL="Help" ><STRONG>Status:</STRONG></A> 
  @@ -197,7 +200,7 @@
   of <CODE>AddDefaultCharset Off</CODE> disables this functionality.
   <CODE>AddDefaultCharset On</CODE> enables Apache's internal
   default charset of <code>iso-8859-1</code> as required by the
  -directive. You can also specify an alternate <em>charset</em> to be used;
  +directive. You can also specify an alternate <EM>charset</EM> to be used;
   e.g. <code>AddDefaultCharset utf-8</code>.
   <P><HR>
   
  @@ -206,7 +209,7 @@
   <A
    HREF="directive-dict.html#Syntax"
    REL="Help"
  -><STRONG>Syntax:</STRONG></A> AddModule <EM>module</em> [<em>module</em>] ...<BR>
  +><STRONG>Syntax:</STRONG></A> AddModule <EM>module</EM> [<EM>module</EM>] ...<BR>
   <A
    HREF="directive-dict.html#Context"
    REL="Help"
  @@ -232,8 +235,8 @@
   <A
    HREF="directive-dict.html#Syntax"
    REL="Help"
  -><STRONG>Syntax:</STRONG></A> AllowOverride All|None|<EM>directive-type</em>
  -[<em>directive-type</em>] ...<BR>
  +><STRONG>Syntax:</STRONG></A> AllowOverride All|None|<EM>directive-type</EM>
  +[<EM>directive-type</EM>] ...<BR>
   <A
    HREF="directive-dict.html#Default"
    REL="Help"
  @@ -260,7 +263,7 @@
   href="directive-dict.html#Context">Context</a> is allowed in .htaccess
   files.</p>
   
  -<p>The <em>directive-type</em> can be one of the following groupings
  +<p>The <EM>directive-type</EM> can be one of the following groupings
   of directives.</p>
   <DL>
   <DT>AuthConfig
  @@ -375,7 +378,7 @@
    HREF="directive-dict.html#Syntax"
    REL="Help"
   ><STRONG>Syntax:</STRONG></A> BindAddress 
  -*|<em>IP-address</em>|<EM>domain-name</EM><BR>
  +*|<EM>IP-address</EM>|<EM>domain-name</EM><BR>
   <A
    HREF="directive-dict.html#Default"
    REL="Help"
  @@ -393,8 +396,8 @@
   IP address of the server machine, or just one IP address of the server
   machine.  If the argument to this directive is *, then the 
   server will listen for connections on every IP address.  Otherwise,
  -the server can listen to only a specific <em>IP-address</em>
  -or a fully-qualified Internet <em>domain-name</em>.</p>
  +the server can listen to only a specific <EM>IP-address</EM>
  +or a fully-qualified Internet <EM>domain-name</EM>.</p>
   
   <p>Only one <CODE>BindAddress</CODE> directive can be used. For more
   control over which address and ports Apache listens to, use the
  @@ -793,6 +796,344 @@
   
   <P><HR>
   
  +<H2><A NAME="ebcdic">EBCDIC-related conversion functions</A></H2>
  +
  + The following EBCDIC related directives are available
  + <B>only if the platform's character set is EBCDIC</B>
  + (This is currently only the case on Fujitsu-Siemens'
  + BS2000/OSD and IBM's OS/390 and TPF operating systems). EBCDIC
  + stands for <EM>Extended Binary-Coded-Decimal Interchange Code</EM>
  + and is the codeset used on mainframe machines, in contrast to
  + ASCII which is ubiquitous on almost all micro computers today.
  + ASCII (or its extension <EM>latin1</EM>) is the basis for the HTTP
  + transfer protocol, therefore all EBCDIC-based platforms need a
  + way to configure the code set conversion rules required between
  + the EBCDIC based mainframe host and the HTTP socket protocol.<BR>
  +
  +<P>
  + On an EBCDIC based system, HTML files and other text files are
  + usually saved encoded in the native EBCDIC code set, while image
  + files and other binary data are stored with identical encoding as
  + on ASCII based machines. When the Apache server accesses documents,
  + it must therefore make a distinction between text files (to be
  + converted to/from ASCII, depending on the transfer direction)
  + and binary files (to be delivered unconverted).
  + Such a distinction can be made based on the assigned MIME type, or
  + based on the file extension (<EM>i.e.</EM>, files sharing a common file
  + suffix).
  +</P>
  +
  +<P>
  + By default, the configuration is symmetric for input and output
  + (<EM>i.e.</EM>, when a PUT request is executed for a document which was
  + returned by a previous GET request, then the resulting uploaded
  + copy should be identical to the original file). However, the
  + conversion directives allow for specifying different conversions
  + for input and output.
  +</P>
  +
  +<P>
  + The directives <a href="#ebcdicconvert">EBCDICConvert</a> and
  + <a href="#ebcdicconvertbytype">EBCDICConvertByType</a> are used to
  + assign the conversion setting (On or Off) based on file
  + extensions or MIME types. Each configuration setting can be defined
  + for input only (<EM>e.g.</EM>, PUT method), output only (<EM>e.g.</EM>, GET method),
  + or both input and output. By default, the conversion setting is
  + applied for input and output.
  +</P>
  +
  +<P>
  + Note that after modifying the conversion settings for a group of
  + files, it is not sufficient to restart the server. The reason for
  + this is the fact that a cached copy of a document (in a browser or
  + proxy cache) will not get revalidated by contents, but only by
  + date. Since the modification time of the document did not change,
  + browsers will assume they can reuse the cached copy.<BR>
  + To recover from this situation, you must either clear all cached
  + copies (browser and proxy cache!), or update the modification time
  + of the documents (using the <CODE>touch</CODE> command on the server).
  +</P>
  +
  +<P>
  + In absense of any
  + <A HREF="#ebcdicconvertbytype">EBCDICConvertByType</A> directive,
  + and if no matching <A HREF="#ebcdicconvert">EBCDICConvert</A> was
  + found, Apache falls back to an internal heuristic which assumes
  + that all documents with MIME types starting with
  + <SAMP>"text/"</SAMP>, <SAMP>"message/"</SAMP> or
  + <SAMP>"multipart/"</SAMP> as well as the MIME type
  + <SAMP>"application/x-www-form-urlencoded"</SAMP> are text documents
  + stored in EBCDIC, whereas all other documents are binary files.
  +</P>
  +
  +<P>
  + In order to provide backward compatibility with older versions of
  + apache, the <A HREF="#ebcdickludge">EBCDICKludge</A> directive
  + allows for a less powerful mechanism to control the conversion of
  + documents to and from EBCDIC.
  +</P>
  +
  +<P>
  + <STRONG>Note</STRONG>:<BLOCKQUOTE>
  + The EBCDICKludge directive is deprecated, since its functionality
  + is superseded by the more powerful
  + <A HREF="#ebcdicconvert">EBCDICConvert</A> and
  + <A HREF="#ebcdicconvertbytype">EBCDICConvertByType</A>
  + directives.</BLOCKQUOTE>
  +</P>
  +
  +<P>
  + The directives are applied in the following order:
  + <OL>
  +  <LI>First, the configured <A HREF="#ebcdicconvert">EBCDICConvert</A>
  +      directives in the current context are evaluated in
  +      configuration file order. As soon as a matching file extension
  +      is found, the search stops and the configured conversion is
  +      applied.<BR>
  +
  +      EBCDICConvert settings inherited from parent directories are
  +      tested after the more specific (deeper) directory levels.
  +      </LI>
  +  <LI>If the <A HREF="#ebcdickludge">EBCDICKludge</A> is in effect,
  +      the next step tests for a MIME type of the format
  +      <SAMP><I>type/</I><B>x-ascii-</B><I>subtype</I></SAMP>. If the
  +      document has such a type, then the
  +      <SAMP>"<B>x-ascii-</B>"</SAMP> substring is removed and the
  +      conversion set to <SAMP>Off</SAMP>.
  +      </LI>
  +  <LI>In the next step, the configured
  +      <A HREF="#ebcdicconvertbytype">EBCDICConvertByType</A>
  +      directives are evaluated in configuration file order. If
  +      the document has a matching MIME type, the search stops and
  +      the configured conversion is applied.<BR>
  +
  +      EBCDICConvertByType settings inherited from parent
  +      directories are tested after the more specific (deeper)
  +      directory levels.<BR>
  +
  +      If no <A HREF="#ebcdicconvertbytype">EBCDICConvertByType</A>
  +      directive at all exists in the current context, the server
  +      falls back to the simple heuristics which assume that MIME
  +      types starting with "text/", "message/" or "multipart/" (plus
  +      the special type "application/x-www-form-urlencoded" used in
  +      simple POST requests) imply a conversion, while all the rest
  +      is delivered unconverted (<EM>i.e.</EM>, binary).
  +      </LI>
  + </OL>
  +</P>
  +
  +<HR>
  +
  +<H2><A NAME="ebcdicconvert">EBCDICConvert</A></H2>
  +<!--%plaintext &lt;?INDEX {\tt EBCDICConvert} directive&gt; -->
  +<A
  + HREF="directive-dict.html#Syntax"
  + REL="Help"
  +><STRONG>Syntax:</STRONG></A> EBCDICConvert <i>{On|Off}[={In|Out|<B>InOut</B>}] extension
  + [extension...]</i><br>
  +<A
  + HREF="directive-dict.html#Context"
  + REL="Help"
  +><STRONG>Context:</STRONG></A> server config, virtual host, directory,
  +.htaccess<BR>
  +<A
  + HREF="directive-dict.html#Status"
  + REL="Help"
  +><STRONG>Status:</STRONG></A> core<BR>
  +<A
  + HREF="directive-dict.html#Override"
  + REL="Help"
  +><STRONG>Override:</STRONG></A> FileInfo<BR>
  +<A
  + HREF="directive-dict.html#Compatibility"
  + REL="Help"
  +><STRONG>Compatibility:</STRONG></A> The configurable EBCDIC conversion
  +is only available in Apache 1.3.19 and later, and on EBCDIC based
  +platforms.<P>
  +
  +<P>
  + The EBCDICConvert directive maps the given filename extensions to
  + the specified conversion setting (<SAMP>On</SAMP> or
  + <SAMP>Off</SAMP>). File extensions may be specified with or without
  + a leading dot.
  +</P>
  +<P>
  + If the optional format <SAMP>On=<i>direction</i></SAMP> (or
  + <SAMP>Off=<i>direction</i></SAMP>) is used, where <i>direction</i>
  + is one of <SAMP>In</SAMP>, <SAMP>Out</SAMP> or <SAMP>InOut</SAMP>,
  + then the directive only applies to the specified transfer direction
  + (<SAMP>In</SAMP>: uploaded content in a PUT or POST request,
  + <SAMP>Out</SAMP>: returned content in a GET or POST request, and
  + <SAMP>InOut</SAMP>: conversion in both directions).<BR>
  + Otherwise, <SAMP>InOut</SAMP> (conversion in both directions) is
  + implied.
  +</P>
  +
  +<P>
  + Conversion configuration based on file extension is tested prior to
  + configuration based on MIME type, to allow for generic MIME based
  + rules to be overridden by a more specific file extension (several
  + file extensions may exist for the same MIME type).
  +</P>
  +
  +<P>
  + <STRONG>Example</STRONG>:<BR>
  + With a configuration like the following, the normal
  + <SAMP>*.html</SAMP> files contain HTML text in EBCDIC encoding,
  + while <SAMP>*.ahtml</SAMP> files contain HTML text in ASCII
  + encoding:
  + <pre>
  +    # *.html and *.ahtml contain HTML text:
  +    AddType  text/html  .html .ahtml
  +
  +    # *.ahtml is not converted (contains ASCII text already):
  +    EBCDICConvert       Off .ahtml
  +
  +    # All other text/html files presumably contain EBCDIC text:
  +    EBCDICConvertByType On  text/html
  + </pre>
  +</P>
  +<P>
  + <STRONG>See also</STRONG>: <A HREF="#ebcdicconvertbytype">EBCDICConvertByType</A>
  +</P>
  +
  +<hr>
  +
  +<H2><A NAME="ebcdicconvertbytype">EBCDICConvertByType</A></H2>
  +<!--%plaintext &lt;?INDEX {\tt EBCDICConvertByType} directive&gt; -->
  +<A
  + HREF="directive-dict.html#Syntax"
  + REL="Help"
  +><STRONG>Syntax:</STRONG></A> EBCDICConvertByType <i>{On|Off}[={In|Out|<B>InOut</B>}] mimetype
  + [mimetype...]</i><br>
  +<A
  + HREF="directive-dict.html#Context"
  + REL="Help"
  +><STRONG>Context:</STRONG></A> server config, virtual host, directory,
  +.htaccess<BR>
  +<A
  + HREF="directive-dict.html#Status"
  + REL="Help"
  +><STRONG>Status:</STRONG></A> core<BR>
  +<A
  + HREF="directive-dict.html#Override"
  + REL="Help"
  +><STRONG>Override:</STRONG></A> FileInfo<BR>
  +<A
  + HREF="directive-dict.html#Compatibility"
  + REL="Help"
  +><STRONG>Compatibility:</STRONG></A> The configurable EBCDIC conversion
  +is only available in Apache 1.3.19 and later, and on EBCDIC based
  +platforms.<P>
  +
  +<P>
  +The EBCDICConvertByType directive maps the given MIME type
  +(optionally containing wildcards) to the specified conversion setting
  +(<SAMP>On</SAMP> or <SAMP>Off</SAMP>).
  +</P>
  +<P>
  + If the optional format <SAMP>On=<i>direction</i></SAMP> (or
  + <SAMP>Off=<i>direction</i></SAMP>) is used, where <i>direction</i>
  + is one of <SAMP>In</SAMP>, <SAMP>Out</SAMP> or <SAMP>InOut</SAMP>,
  + then the directive only applies to the specified transfer direction
  + (<SAMP>In</SAMP>: uploaded content in a PUT or POST request,
  + <SAMP>Out</SAMP>: returned content in a GET or POST request, and
  + <SAMP>InOut</SAMP>: conversion in both directions).<BR>
  + Otherwise, <SAMP>InOut</SAMP> (conversion in both directions) is
  + implied.
  +</P>
  +<P>
  +<STRONG>Example</STRONG>:<BR>
  +A useful standard configuration should at least contain the following
  +defaults:
  +<pre>
  +    # All text documents are stored as EBCDIC files:
  +    EBCDICConvertByType On  text/* message/* multipart/*
  +    EBCDICConvertByType On  application/x-www-form-urlencoded \
  +			    model/vrml application/postscript
  +    # All other files are assumed to be binary:
  +    EBCDICConvertByType Off */*
  +</pre>
  +If you serve ASCII documents only, for example from an NFS mounted
  +unix server, use:
  +<pre>
  +    # All documents are ASCII already:
  +    EBCDICConvertByType Off */*
  +</pre>
  +<P>
  + <STRONG>See also</STRONG>: <A HREF="#ebcdicconvert">EBCDICConvert</A>
  +</P>
  +
  +<P><HR>
  +
  +<H2><A NAME="ebcdickludge">EBCDICKludge</A></H2>
  +<!--%plaintext &lt;?INDEX {\tt EBCDICKludge} directive&gt; -->
  +<A
  + HREF="directive-dict.html#Syntax"
  + REL="Help"
  +><STRONG>Syntax:</STRONG></A> EBCDICKludge <i>{On|Off}</i><BR>
  +<A
  + HREF="directive-dict.html#Default"
  + REL="Help"
  +><STRONG>Default:</STRONG></A> <CODE>EBCDICKludge Off</CODE><BR>
  +<A
  + HREF="directive-dict.html#Context"
  + REL="Help"
  +><STRONG>Context:</STRONG></A> server config, virtual host, directory,
  +.htaccess<BR>
  +<A
  + HREF="directive-dict.html#Status"
  + REL="Help"
  +><STRONG>Status:</STRONG></A> core<BR>
  +<A
  + HREF="directive-dict.html#Override"
  + REL="Help"
  +><STRONG>Override:</STRONG></A> FileInfo<BR>
  +<A
  + HREF="directive-dict.html#Compatibility"
  + REL="Help"
  +><STRONG>Compatibility:</STRONG></A> EBCDICKludge is only available
  +in Apache 1.3.19 and later, and on EBCDIC based platforms.
  +It is deprecated and will be withdrawn in a future version.<BR>
  +
  +<P>
  + The EBCDICKludge is provided for the backward compatible behavior
  + with apache versions 1.3.0 through 1.3.18. In these versions, all
  + files with MIME types starting with "text/", "message/" or
  + "multipart/" or with type "application/x-www-form-urlencoded" would
  + be converted by default, all other documents were returned
  + unconverted. Only if a MIME type
  + "<SAMP>text/<B>x-ascii-</B><I>subtype</I></SAMP>" was configured
  + for a certain document, the document was assumed to be in ASCII
  + format already, and was not converted again. Instead, the
  + "<SAMP><B>x-ascii-</B></SAMP>" was removed from the type, resulting
  + in the MIME type "<SAMP>text/<I>subtype</I></SAMP>" being returned
  + for the document.
  +</P>
  +<P>
  + If the EBCDICKludge directive is set to <SAMP>On</SAMP>, and if
  + none of the file extensions configured with the
  + <A HREF="#ebcdicconvert">EBCDICConvert</A> directive matches in the
  + current context, then the server tests for a MIME type of the
  + format <SAMP><I>type/</I><B>x-ascii-</B><I>subtype</I></SAMP>. If
  + the document has such a type, then the
  + "<SAMP><B>x-ascii-</B></SAMP>" substring is removed and the
  + conversion set to <SAMP>Off</SAMP>. This allows for overriding the
  + implicit assumption that all text files are stored in EBCDIC
  + format, for example when serving documents from an NFS mounted
  + directory with ASCII documents.<BR>
  + By using the EBCDICKludge, there is no way to force one of the
  + other MIME types (<EM>e.g.</EM>, model/vrml) to be treated as an EBCDIC text
  + file. Use of the
  + <A HREF="#ebcdicconvertbytype">EBCDICConvertByType</A> directive
  + mentioned above is the preferred way to configure such a
  + conversion. (Before Apache version 1.3.19, there was no way at all
  + to force these binary documents to be treated as EBCDIC text
  + files.)
  +</P>
  +
  +<HR>
  +
   <H2><A NAME="errordocument">ErrorDocument directive</A></H2>
   <!--%plaintext &lt;?INDEX {\tt ErrorDocument} directive&gt; -->
   <A
  @@ -868,7 +1209,7 @@
   <A
    HREF="directive-dict.html#Syntax"
    REL="Help"
  -><STRONG>Syntax:</STRONG></A> ErrorLog <EM>filename</EM>|syslog[:<em>facility</em>]
  +><STRONG>Syntax:</STRONG></A> ErrorLog <EM>filename</EM>|syslog[:<EM>facility</EM>]
   <BR>
   <A
    HREF="directive-dict.html#Default"
  @@ -1393,7 +1734,7 @@
    HREF="directive-dict.html#Syntax"
    REL="Help"
   ><STRONG>Syntax:</STRONG></A>
  - &lt;Limit <EM>method</em> [<em>method</EM>] ... &gt; ... &lt;/Limit&gt;<BR>
  + &lt;Limit <EM>method</EM> [<EM>method</EM>] ... &gt; ... &lt;/Limit&gt;<BR>
   <A
    HREF="directive-dict.html#Context"
    REL="Help"
  @@ -1434,7 +1775,7 @@
    HREF="directive-dict.html#Syntax"
    REL="Help"
   ><STRONG>Syntax:</STRONG></A>
  - &lt;LimitExcept <EM>method</em> [<em>method</EM>] ... &gt; ... &lt;/LimitExcept&gt;<BR>
  + &lt;LimitExcept <EM>method</EM> [<EM>method</EM>] ... &gt; ... &lt;/LimitExcept&gt;<BR>
   <A
    HREF="directive-dict.html#Context"
    REL="Help"
  @@ -1450,7 +1791,7 @@
   
   &lt;LimitExcept&gt; and &lt;/LimitExcept&gt; are used to enclose a group of
   access control directives which will then apply to any HTTP access method
  -<STRONG>not</STRONG> listed in the arguments; i.e., it is the opposite of a
  +<STRONG>not</STRONG> listed in the arguments; <EM>i.e.</EM>, it is the opposite of a
   <A HREF="#limit">&lt;Limit&gt;</A> section and can be used to control both
   standard and nonstandard/unrecognized methods. See the documentation for 
   <A HREF="#limit">&lt;Limit&gt;</A> for more details.
  @@ -1483,7 +1824,7 @@
   Apache 1.3.2 and later.
   <P>
   
  -<p>This directive specifies the number of <em>bytes</em> from 0
  +<p>This directive specifies the number of <EM>bytes</EM> from 0
   (meaning unlimited) to 2147483647 (2GB) that are allowed in a request
   body.  The default value is defined by the compile-time constant
   <CODE>DEFAULT_LIMIT_REQUEST_BODY</CODE> (0 as distributed).
  @@ -1534,7 +1875,7 @@
   Apache 1.3.2 and later.
   <P>
   
  -<p><em>Number</em> is an integer from 0 (meaning unlimited) to 32767.
  +<p><EM>Number</EM> is an integer from 0 (meaning unlimited) to 32767.
   The default value is defined by the compile-time constant
   <CODE>DEFAULT_LIMIT_REQUEST_FIELDS</CODE> (100 as distributed).
   <P>
  @@ -1582,7 +1923,7 @@
   Apache 1.3.2 and later.
   <P>
   
  -This directive specifies the number of <em>bytes</em> from 0 to the
  +This directive specifies the number of <EM>bytes</EM> from 0 to the
   value of the compile-time constant
   <CODE>DEFAULT_LIMIT_REQUEST_FIELDSIZE</CODE> (8190 as distributed)
   that will be allowed in an HTTP request header.
  @@ -1630,7 +1971,7 @@
   Apache 1.3.2 and later.
   <P>
   
  -This directive sets the number of <em>bytes</em> from 0 to the value
  +This directive sets the number of <EM>bytes</EM> from 0 to the value
   of the compile-time constant <CODE>DEFAULT_LIMIT_REQUEST_LINE</CODE>
   (8190 as distributed) that will be allowed on the HTTP request-line.
   <P>
  @@ -2232,7 +2573,7 @@
   <A
    HREF="directive-dict.html#Syntax"
    REL="Help"
  -><STRONG>Syntax:</STRONG></A> Options [+|-]<em>option</em> [[+|-]<em>option</em>] ...</EM><BR>
  +><STRONG>Syntax:</STRONG></A> Options [+|-]<EM>option</EM> [[+|-]<EM>option</EM>] ...</EM><BR>
   <A
    HREF="directive-dict.html#Context"
    REL="Help"
  @@ -2455,7 +2796,7 @@
   <A
    HREF="directive-dict.html#Syntax"
    REL="Help"
  -><STRONG>Syntax:</STRONG></A> Require <EM>entity-name</em> [<em>entity-name</em>] ...</EM><BR>
  +><STRONG>Syntax:</STRONG></A> Require <EM>entity-name</EM> [<EM>entity-name</EM>] ...</EM><BR>
   <A
    HREF="directive-dict.html#Context"
    REL="Help"
  @@ -2472,9 +2813,9 @@
   This directive selects which authenticated users can access a directory.
   The allowed syntaxes are:
   <UL>
  -<LI>Require user <EM>userid</em> [<em>userid</em>] ...<P>
  +<LI>Require user <EM>userid</EM> [<EM>userid</EM>] ...<P>
   Only the named users can access the directory.<P>
  -<LI>Require group <EM>group-name</em> [<em>group-name</em>] ...<P>
  +<LI>Require group <EM>group-name</EM> [<EM>group-name</EM>] ...<P>
   Only users in the named groups can access the directory.<P>
   <LI>Require valid-user<P>
   All valid users can access the directory.
  @@ -2546,7 +2887,7 @@
    HREF="directive-dict.html#Syntax"
    REL="Help"
   ><STRONG>Syntax:</STRONG></A> RLimitCPU <EM>number</EM>|max
  - [<em>number</em>|max]
  + [<EM>number</EM>|max]
   <BR>
   <A
    HREF="directive-dict.html#Default"
  @@ -2589,8 +2930,8 @@
   <A
    HREF="directive-dict.html#Syntax"
    REL="Help"
  -><STRONG>Syntax:</STRONG></A> RLimitMEM <EM>number</em>|max
  - [<em>number</em>|max]<BR>
  +><STRONG>Syntax:</STRONG></A> RLimitMEM <EM>number</EM>|max
  + [<EM>number</EM>|max]<BR>
   <A
    HREF="directive-dict.html#Default"
    REL="Help"
  @@ -2633,8 +2974,8 @@
   <A
    HREF="directive-dict.html#Syntax"
    REL="Help"
  -><STRONG>Syntax:</STRONG></A> RLimitNPROC <EM>number</em>|max
  - [<em>number</EM>|max]<BR>
  +><STRONG>Syntax:</STRONG></A> RLimitNPROC <EM>number</EM>|max
  + [<EM>number</EM>|max]<BR>
   <A
    HREF="directive-dict.html#Default"
    REL="Help"
  @@ -2847,7 +3188,7 @@
   <A
    HREF="directive-dict.html#Syntax"
    REL="Help"
  -><STRONG>Syntax:</STRONG></A> ServerAlias <EM>hostname</em> [<em>hostname</em>] ...<BR>
  +><STRONG>Syntax:</STRONG></A> ServerAlias <EM>hostname</EM> [<EM>hostname</EM>] ...<BR>
   <A
    HREF="directive-dict.html#Context"
    REL="Help"
  
  
  
  1.69      +3 -0      httpd-docs-1.3/htdocs/manual/mod/directives.html
  
  Index: directives.html
  ===================================================================
  RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/mod/directives.html,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -u -r1.68 -r1.69
  --- directives.html	2000/09/26 15:43:21	1.68
  +++ directives.html	2001/03/09 10:09:56	1.69
  @@ -98,6 +98,9 @@
   <LI><A HREF="core.html#directorymatch">&lt;DirectoryMatch&gt;</A>
   <LI><A HREF="mod_dir.html#directoryindex">DirectoryIndex</A>
   <LI><A HREF="core.html#documentroot">DocumentRoot</A>
  +<LI><A HREF="core.html#ebcdicconvert">EBCDICConvert</A>
  +<LI><A HREF="core.html#ebcdicconvertbytype">EBCDICConvertByType</A>
  +<LI><A HREF="core.html#ebcdickludge">EBCDICKludge</A>
   <LI><A HREF="core.html#errordocument">ErrorDocument</A>
   <LI><A HREF="core.html#errorlog">ErrorLog</A>
   <LI><A HREF="mod_example.html#example">Example</A>
  
  
  
  1.1664    +7 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1663
  retrieving revision 1.1664
  diff -u -u -r1.1663 -r1.1664
  --- CHANGES	2001/03/08 18:11:20	1.1663
  +++ CHANGES	2001/03/09 10:10:09	1.1664
  @@ -1,5 +1,12 @@
   Changes with Apache 1.3.20
   
  +  *) Make EBCDIC conversion fully configurable. Until now, apache relied
  +     on some (incomplete) heuristics, and would fail to correctly serve
  +     text files when they had a MIME type of application/anything, like
  +     application/x-javascript. The new conversion directives allow
  +     defining the conversion based on MIME type or file suffix.
  +     [Martin Kraemer]
  +
     *) Add a -V flag to suexec, which causes it to display the
        compile-time settings with which it was built.  (Only
        usable by root or the HTTPD_USER username.)  [Ken Coar]
  
  
  
  1.37      +1 -1      apache-1.3/src/ap/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/ap/Makefile.tmpl,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -u -r1.36 -r1.37
  --- Makefile.tmpl	2000/06/22 23:22:21	1.36
  +++ Makefile.tmpl	2001/03/09 10:10:12	1.37
  @@ -6,7 +6,7 @@
   LIB=libap.a
   
   OBJS=ap_cpystrn.o ap_execve.o ap_fnmatch.o ap_getpass.o ap_md5c.o ap_signal.o \
  -     ap_slack.o ap_snprintf.o ap_sha1.o ap_checkpass.o ap_base64.o
  +     ap_slack.o ap_snprintf.o ap_sha1.o ap_checkpass.o ap_base64.o ap_ebcdic.o
   
   .c.o:
   	$(CC) -c $(INCLUDES) $(CFLAGS) $<
  
  
  
  1.9       +1 -1      apache-1.3/src/ap/ap_base64.c
  
  Index: ap_base64.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/ap/ap_base64.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -u -r1.8 -r1.9
  --- ap_base64.c	2001/01/15 17:04:10	1.8
  +++ ap_base64.c	2001/03/09 10:10:13	1.9
  @@ -68,7 +68,7 @@
   #include "ap.h"
   
   #ifdef CHARSET_EBCDIC
  -#include "ebcdic.h"
  +#include "ap_ebcdic.h"
   #endif				/* CHARSET_EBCDIC */
   
   /* aaaack but it's fast and const should make it shared text page. */
  
  
  
  1.37      +1 -1      apache-1.3/src/ap/ap_md5c.c
  
  Index: ap_md5c.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/ap/ap_md5c.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -u -r1.36 -r1.37
  --- ap_md5c.c	2001/01/15 17:04:13	1.36
  +++ ap_md5c.c	2001/03/09 10:10:14	1.37
  @@ -106,7 +106,7 @@
   #include "ap_md5.h"
   #include "ap.h"
   #ifdef CHARSET_EBCDIC
  -#include "ebcdic.h"
  +#include "ap_ebcdic.h"
   #endif /*CHARSET_EBCDIC*/
   #if HAVE_CRYPT_H
   #include <crypt.h>
  
  
  
  1.15      +1 -1      apache-1.3/src/ap/ap_sha1.c
  
  Index: ap_sha1.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/ap/ap_sha1.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -u -r1.14 -r1.15
  --- ap_sha1.c	2001/01/15 17:04:13	1.14
  +++ ap_sha1.c	2001/03/09 10:10:15	1.15
  @@ -93,7 +93,7 @@
   #include "ap_sha1.h"
   #include "ap.h"
   #ifdef CHARSET_EBCDIC
  -#include "ebcdic.h"
  +#include "ap_ebcdic.h"
   #endif /*CHARSET_EBCDIC*/
   
   /* a bit faster & bigger, if defined */
  
  
  
  1.1                  apache-1.3/src/ap/ap_ebcdic.c
  
  Index: ap_ebcdic.c
  ===================================================================
  /* ====================================================================
   * Copyright (c) 1995-2000 The Apache Group.  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. All advertising materials mentioning features or use of this
   *    software must display the following acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * 4. The names "Apache Server" and "Apache Group" must not be used to
   *    endorse or promote products derived from this software without
   *    prior written permission. For written permission, please contact
   *    apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *    acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
   * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
   * OF THE POSSIBILITY OF SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Group and was originally based
   * on public domain software written at the National Center for
   * Supercomputing Applications, University of Illinois, Urbana-Champaign.
   * For more information on the Apache Group and the Apache HTTP server
   * project, please see <http://www.apache.org/>.
   *
   */
  
  #include "httpd.h"
  #include "http_core.h"
  #include "http_config.h"
  #include "ap_config.h"
  
  #ifdef CHARSET_EBCDIC
  #include "ap_ebcdic.h"
  
  
  /* ====================================================================== */
  /*     Global functions for dealing with EBCDIC <-> ASCII conversion:     */
  /* ====================================================================== */
  
  /* EBCDIC-to-ASCII tables:
    These tables are bijective - there are no ambigous or duplicate characters.
   */
  const unsigned char os_toascii[256] = {
  #ifdef _OSD_POSIX /* Fujitsu-Siemens' EDF04 character set on BS2000: */
  /*00*/  0x00, 0x01, 0x02, 0x03, 0x85, 0x09, 0x86, 0x7f,
          0x87, 0x8d, 0x8e, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /*................*/
  /*10*/  0x10, 0x11, 0x12, 0x13, 0x8f, 0x0a, 0x08, 0x97,
          0x18, 0x19, 0x9c, 0x9d, 0x1c, 0x1d, 0x1e, 0x1f, /*................*/
  /*20*/  0x80, 0x81, 0x82, 0x83, 0x84, 0x92, 0x17, 0x1b,
          0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x05, 0x06, 0x07, /*................*/
  /*30*/  0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04,
          0x98, 0x99, 0x9a, 0x9b, 0x14, 0x15, 0x9e, 0x1a, /*................*/
  /*40*/  0x20, 0xa0, 0xe2, 0xe4, 0xe0, 0xe1, 0xe3, 0xe5,
          0xe7, 0xf1, 0x60, 0x2e, 0x3c, 0x28, 0x2b, 0x7c, /* .........`.<(+|*/
  /*50*/  0x26, 0xe9, 0xea, 0xeb, 0xe8, 0xed, 0xee, 0xef,
          0xec, 0xdf, 0x21, 0x24, 0x2a, 0x29, 0x3b, 0x9f, /*&.........!$*);.*/
  /*60*/  0x2d, 0x2f, 0xc2, 0xc4, 0xc0, 0xc1, 0xc3, 0xc5,
          0xc7, 0xd1, 0x5e, 0x2c, 0x25, 0x5f, 0x3e, 0x3f, /*-/........^,%_>?*/
  /*70*/  0xf8, 0xc9, 0xca, 0xcb, 0xc8, 0xcd, 0xce, 0xcf,
          0xcc, 0xa8, 0x3a, 0x23, 0x40, 0x27, 0x3d, 0x22, /*..........:#@'="*/
  /*80*/  0xd8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
          0x68, 0x69, 0xab, 0xbb, 0xf0, 0xfd, 0xfe, 0xb1, /*.abcdefghi......*/
  /*90*/  0xb0, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
          0x71, 0x72, 0xaa, 0xba, 0xe6, 0xb8, 0xc6, 0xa4, /*.jklmnopqr......*/
  /*a0*/  0xb5, 0xaf, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
          0x79, 0x7a, 0xa1, 0xbf, 0xd0, 0xdd, 0xde, 0xae, /*..stuvwxyz......*/
  /*b0*/  0xa2, 0xa3, 0xa5, 0xb7, 0xa9, 0xa7, 0xb6, 0xbc,
          0xbd, 0xbe, 0xac, 0x5b, 0x5c, 0x5d, 0xb4, 0xd7, /*...........[\]..*/
  /*c0*/  0xf9, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
          0x48, 0x49, 0xad, 0xf4, 0xf6, 0xf2, 0xf3, 0xf5, /*.ABCDEFGHI......*/
  /*d0*/  0xa6, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50,
          0x51, 0x52, 0xb9, 0xfb, 0xfc, 0xdb, 0xfa, 0xff, /*.JKLMNOPQR......*/
  /*e0*/  0xd9, 0xf7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
          0x59, 0x5a, 0xb2, 0xd4, 0xd6, 0xd2, 0xd3, 0xd5, /*..STUVWXYZ......*/
  /*f0*/  0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
          0x38, 0x39, 0xb3, 0x7b, 0xdc, 0x7d, 0xda, 0x7e  /*0123456789.{.}.~*/
  
  #elif defined(OS390) || defined(TPF)  /* IBM's OS/390 and TPF systems: */
  /*
  Bijective EBCDIC (character set IBM-1047) to US-ASCII table:
  */
      0x00, 0x01, 0x02, 0x03, 0x85, 0x09, 0x86, 0x7f, /* 00-0f:           */
      0x87, 0x8d, 0x8e, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* ................ */
      0x10, 0x11, 0x12, 0x13, 0x8f, 0x0a, 0x08, 0x97, /* 10-1f:           */
      0x18, 0x19, 0x9c, 0x9d, 0x1c, 0x1d, 0x1e, 0x1f, /* ................ */
      0x80, 0x81, 0x82, 0x83, 0x84, 0x92, 0x17, 0x1b, /* 20-2f:           */
      0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x05, 0x06, 0x07, /* ................ */
      0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04, /* 30-3f:           */
      0x98, 0x99, 0x9a, 0x9b, 0x14, 0x15, 0x9e, 0x1a, /* ................ */
      0x20, 0xa0, 0xe2, 0xe4, 0xe0, 0xe1, 0xe3, 0xe5, /* 40-4f:           */
      0xe7, 0xf1, 0xa2, 0x2e, 0x3c, 0x28, 0x2b, 0x7c, /*  ...........<(+| */
      0x26, 0xe9, 0xea, 0xeb, 0xe8, 0xed, 0xee, 0xef, /* 50-5f:           */
      0xec, 0xdf, 0x21, 0x24, 0x2a, 0x29, 0x3b, 0x5e, /* &.........!$*);^ */
      0x2d, 0x2f, 0xc2, 0xc4, 0xc0, 0xc1, 0xc3, 0xc5, /* 60-6f:           */
      0xc7, 0xd1, 0xa6, 0x2c, 0x25, 0x5f, 0x3e, 0x3f, /* -/.........,%_>? */
      0xf8, 0xc9, 0xca, 0xcb, 0xc8, 0xcd, 0xce, 0xcf, /* 70-7f:           */
      0xcc, 0x60, 0x3a, 0x23, 0x40, 0x27, 0x3d, 0x22, /* .........`:#@'=" */
      0xd8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, /* 80-8f:           */
      0x68, 0x69, 0xab, 0xbb, 0xf0, 0xfd, 0xfe, 0xb1, /* .abcdefghi...... */
      0xb0, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, /* 90-9f:           */
      0x71, 0x72, 0xaa, 0xba, 0xe6, 0xb8, 0xc6, 0xa4, /* .jklmnopqr...... */
      0xb5, 0x7e, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, /* a0-af:           */
      0x79, 0x7a, 0xa1, 0xbf, 0xd0, 0x5b, 0xde, 0xae, /* .~stuvwxyz...[.. */
      0xac, 0xa3, 0xa5, 0xb7, 0xa9, 0xa7, 0xb6, 0xbc, /* b0-bf:           */
      0xbd, 0xbe, 0xdd, 0xa8, 0xaf, 0x5d, 0xb4, 0xd7, /* .............].. */
      0x7b, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, /* c0-cf:           */
      0x48, 0x49, 0xad, 0xf4, 0xf6, 0xf2, 0xf3, 0xf5, /* {ABCDEFGHI...... */
      0x7d, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, /* d0-df:           */
      0x51, 0x52, 0xb9, 0xfb, 0xfc, 0xf9, 0xfa, 0xff, /* }JKLMNOPQR...... */
      0x5c, 0xf7, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, /* e0-ef:           */
      0x59, 0x5a, 0xb2, 0xd4, 0xd6, 0xd2, 0xd3, 0xd5, /* \.STUVWXYZ...... */
      0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, /* f0-ff:           */
      0x38, 0x39, 0xb3, 0xdb, 0xdc, 0xd9, 0xda, 0x9f  /* 0123456789...... */
  #else
  #error Unimplemented EBCDIC platform. Please send information about your system to <martin@apache.org>!
  #endif
  };
  
  
  /* Bijective ascii-to-ebcdic table: */
  const unsigned char os_toebcdic[256] = {
  #ifdef _OSD_POSIX /* Fujitsu-Siemens' EDF04 character set on BS2000: */
  /*00*/  0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f,
          0x16, 0x05, 0x15, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,  /*................*/
  /*10*/  0x10, 0x11, 0x12, 0x13, 0x3c, 0x3d, 0x32, 0x26,
          0x18, 0x19, 0x3f, 0x27, 0x1c, 0x1d, 0x1e, 0x1f,  /*................*/
  /*20*/  0x40, 0x5a, 0x7f, 0x7b, 0x5b, 0x6c, 0x50, 0x7d,
          0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61,  /* !"#$%&'()*+,-./ */
  /*30*/  0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
          0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f,  /*0123456789:;<=>?*/
  /*40*/  0x7c, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
          0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6,  /*@ABCDEFGHIJKLMNO*/
  /*50*/  0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6,
          0xe7, 0xe8, 0xe9, 0xbb, 0xbc, 0xbd, 0x6a, 0x6d,  /*PQRSTUVWXYZ[\]^_*/
  /*60*/  0x4a, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
          0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96,  /*`abcdefghijklmno*/
  /*70*/  0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6,
          0xa7, 0xa8, 0xa9, 0xfb, 0x4f, 0xfd, 0xff, 0x07,  /*pqrstuvwxyz{|}~.*/
  /*80*/  0x20, 0x21, 0x22, 0x23, 0x24, 0x04, 0x06, 0x08,
          0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x09, 0x0a, 0x14,  /*................*/
  /*90*/  0x30, 0x31, 0x25, 0x33, 0x34, 0x35, 0x36, 0x17,
          0x38, 0x39, 0x3a, 0x3b, 0x1a, 0x1b, 0x3e, 0x5f,  /*................*/
  /*a0*/  0x41, 0xaa, 0xb0, 0xb1, 0x9f, 0xb2, 0xd0, 0xb5,
          0x79, 0xb4, 0x9a, 0x8a, 0xba, 0xca, 0xaf, 0xa1,  /*................*/
  /*b0*/  0x90, 0x8f, 0xea, 0xfa, 0xbe, 0xa0, 0xb6, 0xb3,
          0x9d, 0xda, 0x9b, 0x8b, 0xb7, 0xb8, 0xb9, 0xab,  /*................*/
  /*c0*/  0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9e, 0x68,
          0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77,  /*................*/
  /*d0*/  0xac, 0x69, 0xed, 0xee, 0xeb, 0xef, 0xec, 0xbf,
          0x80, 0xe0, 0xfe, 0xdd, 0xfc, 0xad, 0xae, 0x59,  /*................*/
  /*e0*/  0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9c, 0x48,
          0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57,  /*................*/
  /*f0*/  0x8c, 0x49, 0xcd, 0xce, 0xcb, 0xcf, 0xcc, 0xe1,
          0x70, 0xc0, 0xde, 0xdb, 0xdc, 0x8d, 0x8e, 0xdf   /*................*/
  #elif defined(OS390) || defined(TPF)  /* IBM's OS/390 and TPF systems: */
  /*
  The US-ASCII to EBCDIC (character set IBM-1047) table:
  This table is bijective (no ambiguous or duplicate characters)
  */
      0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f, /* 00-0f:           */
      0x16, 0x05, 0x15, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* ................ */
      0x10, 0x11, 0x12, 0x13, 0x3c, 0x3d, 0x32, 0x26, /* 10-1f:           */
      0x18, 0x19, 0x3f, 0x27, 0x1c, 0x1d, 0x1e, 0x1f, /* ................ */
      0x40, 0x5a, 0x7f, 0x7b, 0x5b, 0x6c, 0x50, 0x7d, /* 20-2f:           */
      0x4d, 0x5d, 0x5c, 0x4e, 0x6b, 0x60, 0x4b, 0x61, /*  !"#$%&'()*+,-./ */
      0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 30-3f:           */
      0xf8, 0xf9, 0x7a, 0x5e, 0x4c, 0x7e, 0x6e, 0x6f, /* 0123456789:;<=>? */
      0x7c, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 40-4f:           */
      0xc8, 0xc9, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, /* @ABCDEFGHIJKLMNO */
      0xd7, 0xd8, 0xd9, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, /* 50-5f:           */
      0xe7, 0xe8, 0xe9, 0xad, 0xe0, 0xbd, 0x5f, 0x6d, /* PQRSTUVWXYZ[\]^_ */
      0x79, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 60-6f:           */
      0x88, 0x89, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, /* `abcdefghijklmno */
      0x97, 0x98, 0x99, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, /* 70-7f:           */
      0xa7, 0xa8, 0xa9, 0xc0, 0x4f, 0xd0, 0xa1, 0x07, /* pqrstuvwxyz{|}~. */
      0x20, 0x21, 0x22, 0x23, 0x24, 0x04, 0x06, 0x08, /* 80-8f:           */
      0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x09, 0x0a, 0x14, /* ................ */
      0x30, 0x31, 0x25, 0x33, 0x34, 0x35, 0x36, 0x17, /* 90-9f:           */
      0x38, 0x39, 0x3a, 0x3b, 0x1a, 0x1b, 0x3e, 0xff, /* ................ */
      0x41, 0xaa, 0x4a, 0xb1, 0x9f, 0xb2, 0x6a, 0xb5, /* a0-af:           */
      0xbb, 0xb4, 0x9a, 0x8a, 0xb0, 0xca, 0xaf, 0xbc, /* ................ */
      0x90, 0x8f, 0xea, 0xfa, 0xbe, 0xa0, 0xb6, 0xb3, /* b0-bf:           */
      0x9d, 0xda, 0x9b, 0x8b, 0xb7, 0xb8, 0xb9, 0xab, /* ................ */
      0x64, 0x65, 0x62, 0x66, 0x63, 0x67, 0x9e, 0x68, /* c0-cf:           */
      0x74, 0x71, 0x72, 0x73, 0x78, 0x75, 0x76, 0x77, /* ................ */
      0xac, 0x69, 0xed, 0xee, 0xeb, 0xef, 0xec, 0xbf, /* d0-df:           */
      0x80, 0xfd, 0xfe, 0xfb, 0xfc, 0xba, 0xae, 0x59, /* ................ */
      0x44, 0x45, 0x42, 0x46, 0x43, 0x47, 0x9c, 0x48, /* e0-ef:           */
      0x54, 0x51, 0x52, 0x53, 0x58, 0x55, 0x56, 0x57, /* ................ */
      0x8c, 0x49, 0xcd, 0xce, 0xcb, 0xcf, 0xcc, 0xe1, /* f0-ff:           */
      0x70, 0xdd, 0xde, 0xdb, 0xdc, 0x8d, 0x8e, 0xdf  /* ................ */
  #else
  #error Unimplemented EBCDIC platform. Please send information about your system to <martin@apache.org>!
  #endif
  };
  
  
  /* Translate a memory block from EBCDIC (host charset) to ASCII (net charset)
   * dest and srce may be identical, or separate memory blocks, but
   * should not overlap. These functions intentionally have an interface
   * compatible to memcpy(3).
   */
  
  
  API_EXPORT(void *)
  ebcdic2ascii(void *dest, const void *srce, size_t count)
  {
      unsigned char *udest = dest;
      const unsigned char *usrce = srce;
  
      while (count-- != 0) {
          *udest++ = os_toascii[*usrce++];
      }
  
      return dest;
  }
  
  API_EXPORT(void *)
  ascii2ebcdic(void *dest, const void *srce, size_t count)
  {
      unsigned char *udest = dest;
      const unsigned char *usrce = srce;
  
      while (count-- != 0) {
          *udest++ = os_toebcdic[*usrce++];
      }
  
      return dest;
  }
  #endif /*CHARSET_EBCDIC*/
  
  
  
  1.64      +30 -0     apache-1.3/src/include/http_core.h
  
  Index: http_core.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/include/http_core.h,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -u -r1.63 -r1.64
  --- http_core.h	2001/01/15 17:04:33	1.63
  +++ http_core.h	2001/03/09 10:10:20	1.64
  @@ -279,6 +279,36 @@
       interpreter_source_e script_interpreter_source;
   #endif    
       
  +#ifdef CHARSET_EBCDIC
  +    /* Configurable EBCDIC Conversion stuff */
  +    /* Direction specific conversion: */
  +#define dir_Out 0               /* 0utput (returned contents in a GET or POST) */
  +#define dir_In  1               /* 1nput  (uploaded contents in a PUT / POST) */
  +
  +    /* Conversion Enabled/Disabled: */
  +#define conv_Unset '?'          /* Conversion unconfigured */
  +#define conv_Off   '0'          /* BINARY or ASCII file (no conversion) */
  +#define conv_On    '1'          /* TEXT file (EBCDIC->ASCII for dir_Out; ASCII->EBCDIC for dir_In) */
  +
  +    /* The configuration args {On|Off}[={In|Out|InOut}] are currently stored
  +     * as character strings ("0" = conv_Off, "1" = conv_On)
  +     */
  +    table *ebcdicconversion_by_ext_in;
  +    table *ebcdicconversion_by_ext_out;
  +    table *ebcdicconversion_by_type_in;
  +    table *ebcdicconversion_by_type_out;
  +
  +#define LEGACY_KLUDGE 1 /* After a couple of versions this legacy kludge should be set to 0 */
  +#ifndef ASCIITEXT_MAGIC_TYPE_PREFIX
  +#define ASCIITEXT_MAGIC_TYPE_PREFIX "text/x-ascii-"     /* Text files whose content-type starts with this are passed thru unconverted */
  +#endif
  +    int x_ascii_magic_kludge;   /* whether to handle the text/x-ascii- kludge */
  +
  +#if ADD_EBCDICCONVERT_DEBUG_HEADER
  +    int ebcdicconversion_debug_header; /* whether to add an X-EBCDIC-Debug-{In,Out} header to the response */
  +#endif
  +#endif /* CHARSET_EBCDIC */
  +
   } core_dir_config;
   
   /* Per-server core configuration */
  
  
  
  1.340     +16 -5     apache-1.3/src/include/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/include/httpd.h,v
  retrieving revision 1.339
  retrieving revision 1.340
  diff -u -u -r1.339 -r1.340
  --- httpd.h	2001/02/26 17:39:18	1.339
  +++ httpd.h	2001/03/09 10:10:20	1.340
  @@ -616,7 +616,7 @@
   #define CRLF "\015\012"
   #define OS_ASC(c) (c)
   #else /* CHARSET_EBCDIC */
  -#include "ebcdic.h"
  +#include "ap_ebcdic.h"
   /* OSD_POSIX uses the EBCDIC charset. The transition ASCII->EBCDIC is done in
    * the buff package (bread/bputs/bwrite), so everywhere else, we use
    * "native EBCDIC" CR and NL characters. These are therefore defined as
  @@ -833,6 +833,17 @@
        */
       char *case_preserved_filename;
   
  +#ifdef CHARSET_EBCDIC
  +    /* We don't want subrequests to modify our current conversion flags.
  +     * These flags save the state of the conversion flags when subrequests
  +     * are run.
  +     */
  +    struct {
  +        unsigned conv_in:1;    /* convert ASCII->EBCDIC when read()ing? */
  +        unsigned conv_out:1;   /* convert EBCDIC->ASCII when write()ing? */
  +    } ebcdic;
  +#endif
  +
   /* Things placed at the end of the record to avoid breaking binary
    * compatibility.  It would be nice to remember to reorder the entire
    * record to improve 64bit alignment the next time we need to break
  @@ -1117,10 +1128,10 @@
   #endif
   #endif
   
  -#ifdef _OSD_POSIX
  -extern const char *os_set_account(pool *p, const char *account);
  -extern int os_init_job_environment(server_rec *s, const char *user_name, int one_process);
  -#endif /* _OSD_POSIX */
  +#ifdef CHARSET_EBCDIC
  +API_EXPORT(int)    ap_checkconv(struct request_rec *r);    /* for downloads */
  +API_EXPORT(int)    ap_checkconv_in(struct request_rec *r); /* for uploads */
  +#endif /*#ifdef CHARSET_EBCDIC*/
   
   char *ap_get_local_host(pool *);
   unsigned long ap_get_virthost_addr(char *hostname, unsigned short *port);
  
  
  
  1.1                  apache-1.3/src/include/ap_ebcdic.h
  
  Index: ap_ebcdic.h
  ===================================================================
  /* ====================================================================
   * Copyright (c) 1998-1999 The Apache Group.  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. All advertising materials mentioning features or use of this
   *    software must display the following acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * 4. The names "Apache Server" and "Apache Group" must not be used to
   *    endorse or promote products derived from this software without
   *    prior written permission. For written permission, please contact
   *    apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *    acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
   * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
   * OF THE POSSIBILITY OF SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Group and was originally based
   * on public domain software written at the National Center for
   * Supercomputing Applications, University of Illinois, Urbana-Champaign.
   * For more information on the Apache Group and the Apache HTTP server
   * project, please see <http://www.apache.org/>.
   *
   */
  
  #ifndef AP_EBCDIC_H
  #define AP_EBCDIC_H  "$Id: ap_ebcdic.h,v 1.1 2001/03/09 10:10:19 martin Exp $"
  
  #include <sys/types.h>
  
  extern const unsigned char os_toascii[256];
  extern const unsigned char os_toebcdic[256];
  API_EXPORT(void *) ebcdic2ascii(void *dest, const void *srce, size_t count);
  API_EXPORT(void *) ascii2ebcdic(void *dest, const void *srce, size_t count);
  
  #endif /*AP_EBCDIC_H*/
  
  
  
  1.295     +415 -17   apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.294
  retrieving revision 1.295
  diff -u -u -r1.294 -r1.295
  --- http_core.c	2001/02/12 09:59:25	1.294
  +++ http_core.c	2001/03/09 10:10:25	1.295
  @@ -57,6 +57,7 @@
    */
   
   #define CORE_PRIVATE
  +#define ADD_EBCDICCONVERT_DEBUG_HEADER 0
   #include "httpd.h"
   #include "http_config.h"
   #include "http_core.h"
  @@ -158,6 +159,17 @@
       conf->add_default_charset = ADD_DEFAULT_CHARSET_UNSET;
       conf->add_default_charset_name = DEFAULT_ADD_DEFAULT_CHARSET_NAME;
   
  +#ifdef CHARSET_EBCDIC
  +    conf->ebcdicconversion_by_ext_in = ap_make_table(a, 4);
  +    conf->ebcdicconversion_by_ext_out = ap_make_table(a, 4);
  +    conf->ebcdicconversion_by_type_in = ap_make_table(a, 4);
  +    conf->ebcdicconversion_by_type_out = ap_make_table(a, 4);
  +    conf->x_ascii_magic_kludge = 0;
  +#if ADD_EBCDICCONVERT_DEBUG_HEADER
  +    conf->ebcdicconversion_debug_header = 0;
  +#endif
  +#endif /* CHARSET_EBCDIC */
  +
       return (void *)conf;
   }
   
  @@ -292,6 +304,21 @@
   	}
       }
   
  +#ifdef CHARSET_EBCDIC
  +    conf->ebcdicconversion_by_ext_in = ap_overlay_tables(a, new->ebcdicconversion_by_ext_in,
  +                                               base->ebcdicconversion_by_ext_in);
  +    conf->ebcdicconversion_by_ext_out = ap_overlay_tables(a, new->ebcdicconversion_by_ext_out,
  +                                               base->ebcdicconversion_by_ext_out);
  +    conf->ebcdicconversion_by_type_in = ap_overlay_tables(a, new->ebcdicconversion_by_type_in,
  +                                                base->ebcdicconversion_by_type_in);
  +    conf->ebcdicconversion_by_type_out = ap_overlay_tables(a, new->ebcdicconversion_by_type_out,
  +                                                base->ebcdicconversion_by_type_out);
  +    conf->x_ascii_magic_kludge = new->x_ascii_magic_kludge ? new->x_ascii_magic_kludge : base->x_ascii_magic_kludge;
  +#if ADD_EBCDICCONVERT_DEBUG_HEADER
  +    conf->ebcdicconversion_debug_header = new->ebcdicconversion_debug_header ? new->ebcdicconversion_debug_header : base->ebcdicconversion_debug_header;
  +#endif
  +#endif /* CHARSET_EBCDIC */
  +
       return (void*)conf;
   }
   
  @@ -2813,6 +2840,123 @@
   }
   #endif
   
  +
  +#ifdef CHARSET_EBCDIC
  +
  +typedef struct {
  +  char conv_out[2];
  +  char conv_in[2];
  +} parsed_conf_t;
  +
  +/* Check for conversion syntax:  { On | Off } [ = { In | Out | InOut } ] */
  +static parsed_conf_t *
  +parse_on_off_in_out(pool *p, char *arg)
  +{
  +    static parsed_conf_t ret = { { conv_Unset, '\0' }, { conv_Unset, '\0' } };
  +    char *onoff = ap_getword_nc(p, &arg, '=');
  +    int in = 0, out = 0, inout = 0;
  +    char conv_val;
  +
  +    /* Check for valid syntax:  { On | Off } [ = { In | Out | InOut } ] */
  +    if (strcasecmp(onoff, "On") == 0)
  +        conv_val = conv_On;
  +    else if (strcasecmp(onoff, "Off") == 0)
  +        conv_val = conv_Off;
  +    else
  +        return NULL;
  +
  +    /* Check the syntax, and at the same time assign the test results */
  +    if (!(inout = (*arg == '\0')) &&
  +        !(in = (strcasecmp(arg, "In") == 0)) &&
  +        !(out = (strcasecmp(arg, "Out") == 0)) &&
  +        !(inout = (strcasecmp(arg, "InOut") == 0))) {
  +        /* Invalid string, not conforming to syntax! */
  +        return NULL;
  +    }
  +
  +    ret.conv_in[0]  = (in || inout)  ? conv_val : conv_Unset;
  +    ret.conv_out[0] = (out || inout) ? conv_val : conv_Unset;
  +
  +    return &ret;
  +}
  +
  +
  +/* Handle the EBCDICConvert directive:
  + *   EBCDICConvert {On|Off}[={In|Out|InOut}] ext ...
  + */
  +static const char *
  +add_conversion_by_ext(cmd_parms *cmd, core_dir_config *m,
  +		      char *onoff, char *ext)
  +{
  +    parsed_conf_t *onoff_code = parse_on_off_in_out(cmd->pool, onoff);
  +
  +    if (onoff_code == NULL)
  +        return "Invalid syntax: use EBCDICConvert {On|Off}[={In|Out|InOut}] ext [...]";
  +
  +    if (*ext == '.')
  +        ++ext;
  +
  +    if (*onoff_code->conv_in != conv_Unset)
  +	ap_table_addn(m->ebcdicconversion_by_ext_in, ext,
  +		      ap_pstrndup(cmd->pool, onoff_code->conv_in, 1));
  +    if (*onoff_code->conv_out != conv_Unset)
  +	ap_table_addn(m->ebcdicconversion_by_ext_out, ext,
  +		      ap_pstrndup(cmd->pool, onoff_code->conv_out, 1));
  +
  +    return NULL;
  +}
  +
  +
  +/* Handle the EBCDICConvertByType directive:
  + *   EBCDICConvertByType {On|Off}[={In|Out|InOut}] mimetype ...
  + */
  +static const char *
  +add_conversion_by_type(cmd_parms *cmd, core_dir_config *m,
  +		       char *onoff, char *type)
  +{
  +    parsed_conf_t *onoff_code = parse_on_off_in_out(cmd->pool, onoff);
  +
  +    if (onoff_code == NULL)
  +        return "Invalid syntax: use EBCDICConvertByType {On|Off}[={In|Out|InOut}] mimetype [...]";
  +
  +    if (*onoff_code->conv_in != conv_Unset)
  +	ap_table_addn(m->ebcdicconversion_by_type_in, type,
  +		      ap_pstrndup(cmd->pool, onoff_code->conv_in, 1));
  +    if (*onoff_code->conv_out != conv_Unset)
  +	ap_table_addn(m->ebcdicconversion_by_type_out, type,
  +		      ap_pstrndup(cmd->pool, onoff_code->conv_out, 1));
  +
  +    return NULL;
  +}
  +
  +
  +/* Handle the EBCDICKludge directive:
  + *   EBCDICKludge {On|Off}
  + */
  +#ifdef LEGACY_KLUDGE
  +static const char *
  +set_x_ascii_kludge(cmd_parms *cmd, core_dir_config *m, int arg)
  +{
  +    m->x_ascii_magic_kludge = arg;
  +
  +    return NULL;
  +}
  +#endif
  +
  +#if ADD_EBCDICCONVERT_DEBUG_HEADER
  +/* Handle the EBCDICDebugHeader directive:
  + *   EBCDICDebugHeader {On|Off}
  + */
  +static const char *
  +set_debug_header(cmd_parms *cmd, core_dir_config *m, int arg)
  +{
  +    m->ebcdicconversion_debug_header = arg;
  +
  +    return NULL;
  +}
  +#endif
  +#endif /* CHARSET_EBCDIC */
  +
   /* Note --- ErrorDocument will now work from .htaccess files.  
    * The AllowOverride of Fileinfo allows webmasters to turn it off
    */
  @@ -3043,6 +3187,23 @@
     (void*)XtOffsetOf(core_dir_config, limit_req_body),
     OR_ALL, TAKE1,
     "Limit (in bytes) on maximum size of request message body" },
  +
  +/* EBCDIC Conversion directives: */
  +#ifdef CHARSET_EBCDIC
  +{ "EBCDICConvert", add_conversion_by_ext, NULL, OR_FILEINFO, ITERATE2,
  +    "{On|Off}[={In|Out|InOut}] followed by one or more file extensions" },
  +{ "EBCDICConvertByType", add_conversion_by_type, NULL, OR_FILEINFO, ITERATE2,
  +    "{On|Off}[={In|Out|InOut}] followed by one or more MIME types" },
  +#ifdef LEGACY_KLUDGE
  +{ "EBCDICKludge", set_x_ascii_kludge, NULL, OR_FILEINFO, FLAG,
  +    "'On': enable or default='Off': disable the old text/x-ascii-mimetype kludge" },
  +#endif
  +#if ADD_EBCDICCONVERT_DEBUG_HEADER
  +{ "EBCDICDebugHeader", set_debug_header, NULL, OR_FILEINFO, FLAG,
  +    "'On': enable or default='Off': disable the EBCDIC Debugging MIME Header" },
  +#endif
  +#endif /* CHARSET_EBCDIC */
  +
   { NULL }
   };
   
  @@ -3095,6 +3256,259 @@
   
   static int do_nothing(request_rec *r) { return OK; }
   
  +#ifdef CHARSET_EBCDIC
  +struct do_mime_match_parms {
  +    request_rec *request;     /* [In] current request_rec */
  +    int direction;            /* [In] determine conversion for: dir_In|dir_Out */
  +    const char *content_type; /* [In] Content-Type (dir_In: from MIME Header, else r->content_type) */
  +    int match_found;          /* [Out] nonzero if a match was found */
  +    int conv;                 /* [Out] conversion setting if match was found */
  +};
  +
  +
  +/* This routine is called for each mime type configured by the
  + * EBCDICConvertByType directive.
  + */
  +static int
  +do_mime_match(void *rec, const char *key, const char *val)
  +{
  +    int conv = (val[0] == conv_On);
  +    const char *content_type;
  +#if ADD_EBCDICCONVERT_DEBUG_HEADER
  +    request_rec *r = ((struct do_mime_match_parms *) rec)->request;
  +#endif
  +
  +    ((struct do_mime_match_parms *) rec)->match_found = 0;
  +    ((struct do_mime_match_parms *) rec)->conv = conv_Unset;
  +
  +    content_type = ((struct do_mime_match_parms *) rec)->content_type;
  +
  +    /* If no type set: no need to continue */
  +    if (content_type == NULL)
  +        return 0;
  +
  +    /* If the MIME type matches, set the conversion flag appropriately */
  +    if ((ap_is_matchexp(key) && ap_strcasecmp_match(content_type, key) == 0)
  +        || (strcasecmp(key, content_type) == 0)) {
  +
  +        ((struct do_mime_match_parms *) rec)->match_found = 1;
  +        ((struct do_mime_match_parms *) rec)->conv = conv;
  +
  +#if ADD_EBCDICCONVERT_DEBUG_HEADER
  +	ap_table_setn(r->headers_out,
  +               ((((struct do_mime_match_parms *) rec)->direction) == dir_In)
  +		      ? "X-EBCDIC-Debug-In" : "X-EBCDIC-Debug-Out",
  +                       ap_psprintf(r->pool, "EBCDICConversionByType %s %s",
  +                                   conv ? "On" : "Off",
  +                                   key));
  +#endif
  +
  +        /* the mime type scan stops at the first  match. */
  +        return 0;
  +    }
  +
  +    return 1;
  +}
  +
  +static void
  +ap_checkconv_dir(request_rec *r, const char **pType, int dir)
  +{
  +    core_dir_config *conf =
  +    (core_dir_config *) ap_get_module_config(r->per_dir_config, &core_module);
  +    table *conv_by_ext, *conv_by_type;
  +    const char *type, *conversion;
  +    char *ext;
  +    int conv_valid = 0, conv;
  +
  +    conv_by_ext  = (dir == dir_In) ? conf->ebcdicconversion_by_ext_in  : conf->ebcdicconversion_by_ext_out;
  +    conv_by_type = (dir == dir_In) ? conf->ebcdicconversion_by_type_in : conf->ebcdicconversion_by_type_out;
  +
  +    type = (*pType == NULL) ? ap_default_type(r) : *pType;
  +
  +    /* Pseudo "loop" which is executed once only, with break's at individual steps */
  +    do {
  +        /* Step 0: directories result in redirections or in directory listings.
  +	 * Both are EBCDIC text documents.
  +	 * @@@ Should we check for the handler instead?
  +	 */
  +        if (S_ISDIR(r->finfo.st_mode) && dir == dir_Out) {
  +            conv = conv_valid = 1;
  +            break;
  +        }
  +
  +        /* 1st step: check the binding on file extension. This allows us to
  +         * override the conversion default based on a specific name.
  +         * For instance, the following would allow some HTML files
  +         * to be converted (.html) and others passed unconverted (.ahtml):
  +         *     AddType text/html .html .ahtml
  +         *     EBCDICConvert Off .ahtml
  +         * For uploads, this assumes that the destination file name
  +	 * has the correct extension. That may not be true for, e.g.,
  +	 * Netscape Communicator roaming profile uploads!
  +         */
  +        if (r->filename && !ap_is_empty_table(conv_by_ext)) {
  +            const char *fn = strrchr(r->filename, '/');
  +
  +            if (fn == NULL)
  +                fn = r->filename;
  +
  +            /* Parse filename extension */
  +            if ((ext = strrchr(fn, '.')) != NULL) {
  +                ++ext;
  +
  +                /* Check for Content-Type */
  +                if ((conversion = ap_table_get(conv_by_ext, ext)) != NULL) {
  +
  +#if ADD_EBCDICCONVERT_DEBUG_HEADER
  +		    if (conf->ebcdicconversion_debug_header)
  +		        ap_table_setn(r->headers_out,
  +				      (dir == dir_In) ? "X-EBCDIC-Debug-In" : "X-EBCDIC-Debug-Out",
  +				      ap_psprintf(r->pool, "EBCDICConversion %s .%s",
  +						  (conversion[0] == conv_On) ? "On" : "Off",
  +						  ext));
  +#endif
  +
  +                    conv = (conversion[0] == conv_On);
  +                    conv_valid = 1;
  +                    break;
  +                }
  +            }
  +        }
  +
  +
  +        /* 2nd step: test for the old "legacy kludge", that is, a default
  +         * conversion=on for text/?* message/?* multipart/?* and the possibility
  +         * to override the text/?* conversion with a definition like
  +         *    AddType text/x-ascii-plain .atxt
  +         *    AddType text/x-ascii-html  .ahtml
  +         * where the "x-ascii-" would be removed and the conversion switched
  +         * off.
  +         * This step must be performed prior to testing wildcard MIME types
  +         * like text/?* by the EBCDICConvertByType directive.
  +         */
  +#ifdef LEGACY_KLUDGE
  +        /* This fallback is only used when enabled (default=off) */
  +        if (conf->x_ascii_magic_kludge) {
  +            char *magic;
  +
  +            /* If the mime type of a document is set to
  +             * "text/x-ascii-anything", it gets changed to
  +             * "text/anything" here and the conversion is forced to off
  +             * ("binary" or ASCII documents).
  +             */
  +            if (*pType != NULL
  +                && (magic = strstr(*pType, "/x-ascii-")) != NULL) {
  +
  +#if ADD_EBCDICCONVERT_DEBUG_HEADER
  +		if (conf->ebcdicconversion_debug_header)
  +		    ap_table_setn(r->headers_out,
  +				  (dir == dir_In) ? "X-EBCDIC-Debug-In" : "X-EBCDIC-Debug-Out",
  +				  ap_psprintf(r->pool, "EBCDICKludge On (and type is: %s, thus no conversion)",
  +					      *pType));
  +#endif
  +
  +                /* the mime type scan stops at the first  match. */
  +                magic[1] = '\0';        /* overwrite 'x' */
  +
  +                /* Fix MIME type: strip out the magic "x-ascii-" substring */
  +                *pType = ap_pstrcat(r->pool, *pType, &magic[9], NULL);
  +
  +                magic[1] = 'x'; /* restore 'x' in old string (just in case) */
  +
  +                /* Switch conversion to BINARY */
  +                conv = 0;       /* do NOT convert this document */
  +                conv_valid = 1;
  +                break;
  +            }
  +        }
  +#endif /*LEGACY_KLUDGE */
  +
  +
  +        /* 3rd step: check whether a generic conversion was defined for a MIME type,
  +         * like in
  +         *    EBCDICConvertByType  On  model/vrml application/postscript text/?*
  +         */
  +        if (!ap_is_empty_table(conv_by_type)) {
  +            struct do_mime_match_parms do_par;
  +
  +            do_par.request = r;
  +            do_par.direction = dir;
  +	    do_par.content_type = type;
  +
  +            ap_table_do(do_mime_match, (void *) &do_par, conv_by_type, NULL);
  +
  +            if ((conv_valid = do_par.match_found) != 0) {
  +                conv = do_par.conv;
  +                break;
  +            }
  +        }
  +        else /* If no conversion by type was configured, use the default: */
  +        {
  +            /*
  +             * As a final step, mime types starting with "text/", "message/" or
  +             * "multipart/" imply a conversion, while all the rest is
  +             * delivered unconverted (i.e., binary, e.g. application/octet-stream).
  +             */
  +
  +            /* If no content type is set then treat it as text (conversion=on) */
  +            conv =
  +                (type == NULL) ||
  +                (strncasecmp(type, "text/", 5) == 0) ||
  +                (strncasecmp(type, "message/", 8) == 0) ||
  +                (strncasecmp(type, "multipart/", 10) == 0) ||
  +                (strcasecmp(type, "application/x-www-form-urlencoded") == 0);
  +
  +#if ADD_EBCDICCONVERT_DEBUG_HEADER
  +		if (conf->ebcdicconversion_debug_header)
  +		    ap_table_setn(r->headers_out,
  +				  (dir == dir_In) ? "X-EBCDIC-Debug-In" : "X-EBCDIC-Debug-Out",
  +				  ap_psprintf(r->pool,
  +					      "No EBCDICConversion configured (and type is: %s, "
  +					      "=> guessed conversion = %s)",
  +					      type, conv ? "On" : "Off"));
  +#endif
  +            conv_valid = 1;
  +            break;
  +        }
  +    } while (0);
  +
  +    if (conv_valid) {
  +        if (dir == dir_In)
  +            r->ebcdic.conv_in = conv;
  +        else
  +            r->ebcdic.conv_out = conv;
  +    }
  +}
  +
  +/* This function determines the conversion for uploads (PUT/POST): */
  +API_EXPORT(int)
  +ap_checkconv_in(request_rec *r)
  +{
  +    const char *typep;
  +
  +    /* If nothing is being sent as input anyway, we don't bother about conversion */
  +    /* (see ap_should_client_block())*/
  +    if (r->read_length || (!r->read_chunked && (r->remaining <= 0)))
  +        return r->ebcdic.conv_in;
  +
  +    typep = ap_table_get(r->headers_in, "Content-Type");
  +    ap_checkconv_dir(r, &typep, dir_In);
  +
  +    return r->ebcdic.conv_in;
  +}
  +
  +
  +/* Backward compatibility function */
  +API_EXPORT(int)
  +ap_checkconv(request_rec *r)
  +{
  +    ap_checkconv_dir(r, &r->content_type, dir_Out);
  +    return r->ebcdic.conv_out;
  +}
  +
  +#endif /* CHARSET_EBCDIC */
  +
  +
   #ifdef USE_MMAP_FILES
   struct mmap_rec {
       void *mm;
  @@ -3130,9 +3544,6 @@
   #ifdef USE_MMAP_FILES
       caddr_t mm;
   #endif
  -#ifdef CHARSET_EBCDIC
  -    int convert_flag;
  -#endif
   
       /* This handler has no use for a request body (yet), but we still
        * need to read and discard it if the client sent one.
  @@ -3188,19 +3599,6 @@
           return errstatus;
       }
   
  -#ifdef CHARSET_EBCDIC
  -    /* To make serving of "raw ASCII text" files easy (they serve faster
  -     * since they don't have to be converted from EBCDIC), a new
  -     * "magic" type prefix was invented: text/x-ascii-{plain,html,...}
  -     * If we detect one of these content types here, we simply correct
  -     * the type to the real text/{plain,html,...} type. Otherwise, we
  -     * set a flag that translation is required later on.
  -     *
  -     * Note: convert_flag is not used in the MMAP path;
  -     * ap_checkconv() sets a request_req flag based on content_type
  -     */ 
  -    convert_flag = ap_checkconv(r);
  -#endif
   #ifdef USE_MMAP_FILES
       ap_block_alarms();
       if ((r->finfo.st_size >= MMAP_THRESHOLD)
  @@ -3226,7 +3624,7 @@
   #ifdef CHARSET_EBCDIC
   	if (d->content_md5 & 1) {
   	    ap_table_setn(r->headers_out, "Content-MD5",
  -			  ap_md5digest(r->pool, f, convert_flag));
  +			  ap_md5digest(r->pool, f, r->ebcdic.conv_out));
   	}
   #else
   	if (d->content_md5 & 1) {
  
  
  
  1.300     +46 -28    apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.299
  retrieving revision 1.300
  diff -u -u -r1.299 -r1.300
  --- http_protocol.c	2001/02/16 14:53:24	1.299
  +++ http_protocol.c	2001/03/09 10:10:26	1.300
  @@ -95,13 +95,18 @@
   #define POP_EBCDIC_INPUTCONVERSION_STATE(_buff) \
           ap_bsetflag(_buff, B_ASCII2EBCDIC, _convert_in);
   
  -#define PUSH_EBCDIC_OUTPUTCONVERSION_STATE(_buff, _onoff) \
  -        int _convert_out = ap_bgetflag(_buff, B_EBCDIC2ASCII); \
  -        ap_bsetflag(_buff, B_EBCDIC2ASCII, _onoff);
  +#define PUSH_EBCDIC_INPUTCONVERSION_STATE_r(_req, _onoff) \
  +        ap_bsetflag(_req->connection->client, B_ASCII2EBCDIC, _onoff);
   
  -#define POP_EBCDIC_OUTPUTCONVERSION_STATE(_buff) \
  -        ap_bsetflag(_buff, B_EBCDIC2ASCII, _convert_out);
  +#define POP_EBCDIC_INPUTCONVERSION_STATE_r(_req) \
  +        ap_bsetflag(_req->connection->client, B_ASCII2EBCDIC, _req->ebcdic.conv_in);
   
  +#define PUSH_EBCDIC_OUTPUTCONVERSION_STATE_r(_req, _onoff) \
  +        ap_bsetflag(_req->connection->client, B_EBCDIC2ASCII, _onoff);
  +
  +#define POP_EBCDIC_OUTPUTCONVERSION_STATE_r(_req) \
  +        ap_bsetflag(_req->connection->client, B_EBCDIC2ASCII, _req->ebcdic.conv_out);
  +
   #endif /*CHARSET_EBCDIC*/
   
   /*
  @@ -238,7 +243,7 @@
        * set to ON (protocol strings MUST be converted)
        * and reset to original setting before returning
        */
  -    PUSH_EBCDIC_OUTPUTCONVERSION_STATE(r->connection->client, 1);
  +    PUSH_EBCDIC_OUTPUTCONVERSION_STATE_r(r, 1);
   #endif /*CHARSET_EBCDIC*/
   
       if (start < 0 || end < 0) {
  @@ -262,7 +267,7 @@
       }
   
   #ifdef CHARSET_EBCDIC
  -    POP_EBCDIC_OUTPUTCONVERSION_STATE(r->connection->client);
  +    POP_EBCDIC_OUTPUTCONVERSION_STATE_r(r);
   #endif /*CHARSET_EBCDIC*/
   
       return length;
  @@ -1106,7 +1111,8 @@
       r->the_request     = NULL;
   
   #ifdef CHARSET_EBCDIC
  -    ap_bsetflag(r->connection->client, B_ASCII2EBCDIC|B_EBCDIC2ASCII, 1);
  +    ap_bsetflag(r->connection->client, B_ASCII2EBCDIC, r->ebcdic.conv_in  = 1);
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out = 1);
   #endif
   
       /* Get the request... */
  @@ -1322,8 +1328,8 @@
           return AUTH_REQUIRED;
       }
   
  -    /* CHARSET_EBCDIC Issue's here ?!? Compare with 32/9 instead
  -     * as we are operating on an octed stream ?
  +    /* No CHARSET_EBCDIC Issue here because the line has already
  +     * been converted to native text.
        */
       while (*auth_line== ' ' || *auth_line== '\t')
           auth_line++;
  @@ -1481,7 +1487,7 @@
           protocol = SERVER_PROTOCOL;
   
   #ifdef CHARSET_EBCDIC
  -    { PUSH_EBCDIC_OUTPUTCONVERSION_STATE(r->connection->client, 1);
  +    PUSH_EBCDIC_OUTPUTCONVERSION_STATE_r(r, 1);
   #endif /*CHARSET_EBCDIC*/
   
       /* Output the HTTP/1.x Status-Line and the Date and Server fields */
  @@ -1494,7 +1500,7 @@
       ap_table_unset(r->headers_out, "Date");        /* Avoid bogosity */
       ap_table_unset(r->headers_out, "Server");
   #ifdef CHARSET_EBCDIC
  -    POP_EBCDIC_OUTPUTCONVERSION_STATE(r->connection->client); }
  +    POP_EBCDIC_OUTPUTCONVERSION_STATE_r(r);
   #endif /*CHARSET_EBCDIC*/
   }
   
  @@ -1565,6 +1571,10 @@
   
       r->content_type = "message/http";
       ap_send_http_header(r);
  +#ifdef CHARSET_EBCDIC
  +    /* Server-generated response, converted */
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out = 1);
  +#endif
   
       /* Now we recreate the request, and echo it back */
   
  @@ -1702,6 +1712,11 @@
       int i;
       const long int zero = 0L;
   
  +#ifdef CHARSET_EBCDIC
  +    /* Use previously determined conversion (output): */
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, ap_checkconv(r));
  +#endif /*CHARSET_EBCDIC*/
  +
       if (r->assbackwards) {
           if (!r->main)
               ap_bsetopt(r->connection->client, BO_BYTECT, &zero);
  @@ -1737,7 +1752,7 @@
       ap_basic_http_header(r);
   
   #ifdef CHARSET_EBCDIC
  -    { PUSH_EBCDIC_OUTPUTCONVERSION_STATE(r->connection->client, 1);
  +    PUSH_EBCDIC_OUTPUTCONVERSION_STATE_r(r, 1);
   #endif /*CHARSET_EBCDIC*/
   
       ap_set_keepalive(r);
  @@ -1790,7 +1805,7 @@
       if (r->chunked)
           ap_bsetflag(r->connection->client, B_CHUNK, 1);
   #ifdef CHARSET_EBCDIC
  -    POP_EBCDIC_OUTPUTCONVERSION_STATE(r->connection->client); }
  +    POP_EBCDIC_OUTPUTCONVERSION_STATE_r(r);
   #endif /*CHARSET_EBCDIC*/
   }
   
  @@ -1803,7 +1818,7 @@
   {
       if (r->chunked && !r->connection->aborted) {
   #ifdef CHARSET_EBCDIC
  -	PUSH_EBCDIC_OUTPUTCONVERSION_STATE(r->connection->client, 1);
  +        PUSH_EBCDIC_OUTPUTCONVERSION_STATE_r(r, 1);
   #endif
           /*
            * Turn off chunked encoding --- we can only do this once.
  @@ -1818,7 +1833,7 @@
           ap_kill_timeout(r);
   
   #ifdef CHARSET_EBCDIC
  -	POP_EBCDIC_OUTPUTCONVERSION_STATE(r->connection->client);
  +        POP_EBCDIC_OUTPUTCONVERSION_STATE_r(r);
   #endif /*CHARSET_EBCDIC*/
       }
   }
  @@ -1917,18 +1932,11 @@
   
   #ifdef CHARSET_EBCDIC
       {
  -        /* @@@ Temporary kludge for guessing the conversion @@@
  -         * from looking at the MIME header. 
  +        /* Determine the EBCDIC conversion for the uploaded content
  +         * by looking at the Content-Type MIME header. 
            * If no Content-Type header is found, text conversion is assumed.
            */
  -        const char *typep = ap_table_get(r->headers_in, "Content-Type");
  -        int convert_in = (typep == NULL ||
  -                          strncasecmp(typep, "text/", 5) == 0 ||
  -                          strncasecmp(typep, "message/", 8) == 0 ||
  -                          strncasecmp(typep, "multipart/", 10) == 0 ||
  -                          strcasecmp (typep, "application/x-www-form-urlencoded") == 0
  -                         );
  -        ap_bsetflag(r->connection->client, B_ASCII2EBCDIC, convert_in);
  +        ap_bsetflag(r->connection->client, B_ASCII2EBCDIC, ap_checkconv_in(r));
       }
   #endif
   
  @@ -1959,6 +1967,7 @@
       while (ap_isxdigit(*b)) {
           int xvalue = 0;
   
  +	/* This works even on EBCDIC. */
           if (*b >= '0' && *b <= '9')
               xvalue = *b - '0';
           else if (*b >= 'A' && *b <= 'F')
  @@ -2118,7 +2127,7 @@
       if (r->remaining == 0) {    /* End of chunk, get trailing CRLF */
   #ifdef CHARSET_EBCDIC
           /* Chunk end is Protocol stuff! Set conversion = 1 to read CR LF: */
  -        PUSH_EBCDIC_INPUTCONVERSION_STATE(r->connection->client, 1);
  +        PUSH_EBCDIC_INPUTCONVERSION_STATE_r(r, 1);
   #endif /*CHARSET_EBCDIC*/
   
           if ((c = ap_bgetc(r->connection->client)) == CR) {
  @@ -2127,7 +2136,7 @@
   
   #ifdef CHARSET_EBCDIC
           /* restore ASCII->EBCDIC conversion state */
  -        POP_EBCDIC_INPUTCONVERSION_STATE(r->connection->client);
  +        POP_EBCDIC_INPUTCONVERSION_STATE_r(r);
   #endif /*CHARSET_EBCDIC*/
   
           if (c != LF) {
  @@ -2590,6 +2599,10 @@
       int idx = ap_index_of_response(status);
       char *custom_response;
       const char *location = ap_table_get(r->headers_out, "Location");
  +#ifdef CHARSET_EBCDIC
  +    /* Error Responses (builtin / string literal / redirection) are TEXT! */
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out = 1);
  +#endif
   
       /*
        * It's possible that the Location field might be in r->err_headers_out
  @@ -2676,6 +2689,11 @@
               return;
           }
       }
  +
  +#ifdef CHARSET_EBCDIC
  +    /* Server-generated response, converted */
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out = 1);
  +#endif
   
       ap_hard_timeout("send error body", r);
   
  
  
  
  1.162     +15 -7     apache-1.3/src/main/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_request.c,v
  retrieving revision 1.161
  retrieving revision 1.162
  diff -u -u -r1.161 -r1.162
  --- http_request.c	2001/02/13 14:02:26	1.161
  +++ http_request.c	2001/03/09 10:10:27	1.162
  @@ -782,6 +782,11 @@
       request_rec *rr = ap_pcalloc(rrp, sizeof(request_rec));
   
       rr->pool = rrp;
  +#ifdef CHARSET_EBCDIC
  +    /* Assume virgin state (like after reading the request_line): */
  +    ap_bsetflag(r->connection->client, B_ASCII2EBCDIC, rr->ebcdic.conv_in  = 1);
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, rr->ebcdic.conv_out = 1);
  +#endif   
       return rr;
   }
   
  @@ -1007,20 +1012,19 @@
   
   API_EXPORT(int) ap_run_sub_req(request_rec *r)
   {
  -#ifndef CHARSET_EBCDIC
       int retval = ap_invoke_handler(r);
  -#else /*CHARSET_EBCDIC*/
  -    /* Save the EBCDIC conversion setting of the caller across subrequests */
  -    int convert = ap_bgetflag(r->connection->client, B_EBCDIC2ASCII);
  -    int retval  = ap_invoke_handler(r);
  -    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, convert);
  -#endif /*CHARSET_EBCDIC*/
       ap_finalize_sub_req_protocol(r);
       return retval;
   }
   
   API_EXPORT(void) ap_destroy_sub_req(request_rec *r)
   {
  +#ifdef CHARSET_EBCDIC
  +    if (r->main) {
  +        ap_bsetflag(r->connection->client, B_ASCII2EBCDIC, r->main->ebcdic.conv_in);
  +        ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->main->ebcdic.conv_out);
  +    }
  +#endif   
       /* Reclaim the space */
       ap_destroy_pool(r->pool);
   }
  @@ -1404,6 +1408,10 @@
       new->no_local_copy   = r->no_local_copy;
       new->read_length     = r->read_length;     /* We can only read it once */
       new->vlist_validator = r->vlist_validator;
  +#ifdef CHARSET_EBCDIC /* @@@ Is this correct? When is it used? */
  +    new->ebcdic.conv_out= r->ebcdic.conv_out;
  +    new->ebcdic.conv_in = r->ebcdic.conv_in;
  +#endif
   
       ap_table_setn(new->subprocess_env, "REDIRECT_STATUS",
   	ap_psprintf(r->pool, "%d", r->status));
  
  
  
  1.42      +6 -0      apache-1.3/src/modules/example/mod_example.c
  
  Index: mod_example.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/example/mod_example.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -u -r1.41 -r1.42
  --- mod_example.c	2001/01/18 21:23:39	1.41
  +++ mod_example.c	2001/03/09 10:10:30	1.42
  @@ -513,8 +513,14 @@
        * is broken.
        */
       r->content_type = "text/html";
  +
       ap_soft_timeout("send example call trace", r);
       ap_send_http_header(r);
  +#ifdef CHARSET_EBCDIC
  +    /* Server-generated response, converted */
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out = 1);
  +#endif
  +
       /*
        * If we're only supposed to send header information (HEAD request), we're
        * already there.
  
  
  
  1.87      +11 -1     apache-1.3/src/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -u -r1.86 -r1.87
  --- proxy_ftp.c	2001/02/09 12:40:27	1.86
  +++ proxy_ftp.c	2001/03/09 10:10:31	1.87
  @@ -1137,9 +1137,16 @@
       ap_table_setn(resp_hdrs, "Date", ap_gm_timestr_822(r->pool, r->request_time));
       ap_table_setn(resp_hdrs, "Server", ap_get_server_version());
   
  -    if (parms[0] == 'd')
  +    if (parms[0] == 'd') {
   	ap_table_setn(resp_hdrs, "Content-Type", "text/html");
  +#ifdef CHARSET_EBCDIC
  +	r->ebcdic.conv_out = 1; /* server-generated */
  +#endif
  +    }
       else {
  +#ifdef CHARSET_EBCDIC
  +	r->ebcdic.conv_out = 0; /* do not convert what we read from the ftp server */
  +#endif
   	if (r->content_type != NULL) {
   	    ap_table_setn(resp_hdrs, "Content-Type", r->content_type);
   	    Explain1("FTP: Content-Type set to %s", r->content_type);
  @@ -1232,6 +1239,9 @@
   
       ap_bsetopt(r->connection->client, BO_BYTECT, &zero);
       r->sent_bodyct = 1;
  +#ifdef CHARSET_EBCDIC
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out);
  +#endif
   /* send body */
       if (!r->header_only) {
   	if (parms[0] != 'd') {
  
  
  
  1.120     +5 -0      apache-1.3/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -u -u -r1.119 -r1.120
  --- mod_autoindex.c	2001/01/15 17:05:38	1.119
  +++ mod_autoindex.c	2001/03/09 10:10:33	1.120
  @@ -1627,6 +1627,11 @@
       }
       ap_send_http_header(r);
   
  +#ifdef CHARSET_EBCDIC
  +    /* Server-generated response, converted */
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out = 1);
  +#endif
  +
       if (r->header_only) {
   	ap_pclosedir(r->pool, d);
   	return 0;
  
  
  
  1.99      +7 -8      apache-1.3/src/modules/standard/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_cgi.c,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -u -r1.98 -r1.99
  --- mod_cgi.c	2001/01/15 17:05:39	1.98
  +++ mod_cgi.c	2001/03/09 10:10:33	1.99
  @@ -445,9 +445,13 @@
   #endif   /* TPF */
   
   #ifdef CHARSET_EBCDIC
  -    /* XXX:@@@ Is the generated/included output ALWAYS in text/ebcdic format? */
  -    /* Or must we check the Content-Type first? */
  -    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, 1);
  +    /* The included MIME headers must ALWAYS be in text/ebcdic format.
  +     * Only after reading the MIME headers, we check the Content-Type
  +     * and switch to the necessary conversion mode.
  +     * Until then (and in case an nph- script was called), use the
  +     * configured default conversion:
  +     */
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out);
   #endif /*CHARSET_EBCDIC*/
   
       /*
  @@ -515,11 +519,6 @@
   	if ((ret = ap_scan_script_header_err_buff(r, script_in, sbuf))) {
   	    return log_script(r, conf, ret, dbuf, sbuf, script_in, script_err);
   	}
  -
  -#ifdef CHARSET_EBCDIC
  -        /* Now check the Content-Type to decide if conversion is needed */
  -        ap_checkconv(r);
  -#endif /*CHARSET_EBCDIC*/
   
   	location = ap_table_get(r->headers_out, "Location");
   
  
  
  
  1.55      +4 -0      apache-1.3/src/modules/standard/mod_imap.c
  
  Index: mod_imap.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_imap.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -u -r1.54 -r1.55
  --- mod_imap.c	2001/01/15 17:05:42	1.54
  +++ mod_imap.c	2001/03/09 10:10:34	1.55
  @@ -507,6 +507,10 @@
   {
       r->content_type = "text/html";
       ap_send_http_header(r);
  +#ifdef CHARSET_EBCDIC
  +    /* Server-generated response, converted */
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out = 1);
  +#endif
       ap_hard_timeout("send menu", r);       /* killed in menu_footer */
   
       ap_rvputs(r, DOCTYPE_HTML_3_2, "<html><head>\n<title>Menu for ", r->uri,
  
  
  
  1.54      +4 -0      apache-1.3/src/modules/standard/mod_info.c
  
  Index: mod_info.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_info.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -u -r1.53 -r1.54
  --- mod_info.c	2001/01/15 17:05:43	1.53
  +++ mod_info.c	2001/03/09 10:10:34	1.54
  @@ -443,6 +443,10 @@
       if (r->header_only) {
           return 0;
       }
  +#ifdef CHARSET_EBCDIC
  +    /* Server-generated response, converted */
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out = 1);
  +#endif
       ap_hard_timeout("send server info", r);
   
       ap_rputs(DOCTYPE_HTML_3_2
  
  
  
  1.120     +4 -0      apache-1.3/src/modules/standard/mod_status.c
  
  Index: mod_status.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_status.c,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -u -u -r1.119 -r1.120
  --- mod_status.c	2001/01/15 17:05:50	1.119
  +++ mod_status.c	2001/03/09 10:10:35	1.120
  @@ -299,6 +299,10 @@
       }
   
       ap_send_http_header(r);
  +#ifdef CHARSET_EBCDIC
  +    /* Server-generated response, converted */
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out = 1);
  +#endif
   
       if (r->header_only)
   	return 0;
  
  
  
  1.11      +4 -0      apache-1.3/src/modules/test/mod_rndchunk.c
  
  Index: mod_rndchunk.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/test/mod_rndchunk.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -u -r1.10 -r1.11
  --- mod_rndchunk.c	2001/01/15 17:06:09	1.10
  +++ mod_rndchunk.c	2001/03/09 10:10:37	1.11
  @@ -106,6 +106,10 @@
   
       r->content_type = "text/html";		
       ap_send_http_header(r);
  +#ifdef CHARSET_EBCDIC
  +    /* Server-generated response, converted */
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out = 1);
  +#endif
       if(r->header_only) {
   	return 0;
       }
  
  
  
  1.11      +4 -0      apache-1.3/src/modules/test/mod_test_util_uri.c
  
  Index: mod_test_util_uri.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/test/mod_test_util_uri.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -u -r1.10 -r1.11
  --- mod_test_util_uri.c	2001/01/15 17:06:09	1.10
  +++ mod_test_util_uri.c	2001/03/09 10:10:37	1.11
  @@ -271,6 +271,10 @@
   
       r->content_type = "text/html";		
       ap_send_http_header(r);
  +#ifdef CHARSET_EBCDIC
  +    /* Server-generated response, converted */
  +    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, r->ebcdic.conv_out = 1);
  +#endif
       if(r->header_only) {
   	return 0;
       }
  
  
  
  1.12      +1 -1      apache-1.3/src/os/bs2000/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/bs2000/Makefile.tmpl,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -u -r1.11 -r1.12
  --- Makefile.tmpl	2000/06/22 23:22:51	1.11
  +++ Makefile.tmpl	2001/03/09 10:10:39	1.12
  @@ -3,7 +3,7 @@
   INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
   LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
   
  -OBJS=   os.o os-inline.o ebcdic.o bs2login.o
  +OBJS=   os.o os-inline.o bs2login.o
   
   LIB=	libos.a
   
  
  
  
  1.17      +0 -183    apache-1.3/src/os/bs2000/ebcdic.c
  
  	<<Binary file>>
  
  
  1.9       +4 -9      apache-1.3/src/os/bs2000/ebcdic.h
  
  Index: ebcdic.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/bs2000/ebcdic.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -u -r1.8 -r1.9
  --- ebcdic.h	2000/06/21 14:36:32	1.8
  +++ ebcdic.h	2001/03/09 10:10:40	1.9
  @@ -1,11 +1,6 @@
  -#ifndef AP_EBCDIC_H
  -#define AP_EBCDIC_H  "$Id: ebcdic.h,v 1.8 2000/06/21 14:36:32 martin Exp $"
  +#ifndef EBCDIC_H
  +#define EBCDIC_H  "$Id: ebcdic.h,v 1.9 2001/03/09 10:10:40 martin Exp $"
   
  -#include <sys/types.h>
  +#include <ap_ebcdic.h>
   
  -extern const unsigned char os_toascii[256];
  -extern const unsigned char os_toebcdic[256];
  -API_EXPORT(void *) ebcdic2ascii(void *dest, const void *srce, size_t count);
  -API_EXPORT(void *) ascii2ebcdic(void *dest, const void *srce, size_t count);
  -
  -#endif /*AP_EBCDIC_H*/
  +#endif /*EBCDIC_H*/
  
  
  
  1.18      +0 -38     apache-1.3/src/os/bs2000/os.c
  
  Index: os.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/bs2000/os.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -u -r1.17 -r1.18
  --- os.c	2001/01/15 17:06:12	1.17
  +++ os.c	2001/03/09 10:10:40	1.18
  @@ -65,44 +65,6 @@
   #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
  -     * "magic" type prefix was invented: text/x-ascii-{plain,html,...}
  -     * If we detect one of these content types here, we simply correct
  -     * the type to the real text/{plain,html,...} type. Otherwise, we
  -     * 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);
  -
  -    /* Conversion is applied to text/ files only, if ever. */
  -    if (type && (strncasecmp(type, "text/", 5) == 0 ||
  -		 strncasecmp(type, "message/", 8) == 0 ||
  -		 strncasecmp(type, "multipart/", 10) == 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);
  -        else
  -	    /* 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;
  -}
  -
   #ifdef HAVE_DLFCN_H
   #include "../unix/os.c"
   #endif
  
  
  
  1.21      +16 -4     apache-1.3/src/os/bs2000/os.h
  
  Index: os.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/bs2000/os.h,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -u -r1.20 -r1.21
  --- os.h	2000/06/15 13:07:31	1.20
  +++ os.h	2001/03/09 10:10:41	1.21
  @@ -42,10 +42,22 @@
   extern int _rini(_rini_struct *);
   #endif /* !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) */
   
  -/* Sorry if this is ugly, but the include order doesn't allow me
  - * to use request_rec here... */
  -struct request_rec;
  -extern int ap_checkconv(struct request_rec *r);
   extern pid_t os_fork(const char *user);
  +#ifdef _OSD_POSIX
  +struct pool;
  +extern const char *os_set_account(struct pool *p, const char *account);
  +struct server_rec;
  +extern int os_init_job_environment(struct server_rec *s, const char *user_name, int one_process);
  +#endif
  +
  +#ifdef HAVE_DLFCN_H
  +#include <dlfcn.h>
  +#define     ap_os_dso_handle_t  void *
  +void        ap_os_dso_init(void);
  +void *      ap_os_dso_load(const char *);
  +void        ap_os_dso_unload(void *);
  +void *      ap_os_dso_sym(void *, const char *);
  +const char *ap_os_dso_error(void);
  +#endif
   
   #endif /*! APACHE_OS_H*/
  
  
  
  1.3       +1 -9      apache-1.3/src/os/os390/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/os390/Makefile.tmpl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- Makefile.tmpl	2000/06/22 23:22:54	1.2
  +++ Makefile.tmpl	2001/03/09 10:10:44	1.3
  @@ -3,7 +3,7 @@
   INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
   LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
   
  -OBJS=   os.o os-inline.o ebcdic.o
  +OBJS=   os.o os-inline.o
   
   LIB=	libos.a
   
  @@ -39,14 +39,6 @@
   
   # DO NOT REMOVE
   
  -ebcdic.o: ebcdic.c
  -ebcdic.o: $(INCDIR)/ap_config.h
  -ebcdic.o: $(INCDIR)/ap_mmn.h
  -ebcdic.o: $(INCDIR)/ap_config_auto.h
  -ebcdic.o: os.h
  -ebcdic.o: $(INCDIR)/ap_ctype.h
  -ebcdic.o: $(INCDIR)/hsregex.h
  -ebcdic.o: ebcdic.h
   os-inline.o: os-inline.c
   os-inline.o: $(INCDIR)/ap_config.h
   os-inline.o: $(INCDIR)/ap_mmn.h
  
  
  
  1.6       +0 -174    apache-1.3/src/os/os390/ebcdic.c
  
  	<<Binary file>>
  
  
  1.4       +5 -5      apache-1.3/src/os/os390/ebcdic.h
  
  Index: ebcdic.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/os390/ebcdic.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- ebcdic.h	2000/01/07 16:04:13	1.3
  +++ ebcdic.h	2001/03/09 10:10:45	1.4
  @@ -1,6 +1,6 @@
  -#include <sys/types.h>
  +#ifndef EBCDIC_H
  +#define EBCDIC_H  "$Id: ebcdic.h,v 1.4 2001/03/09 10:10:45 martin Exp $"
   
  -extern const unsigned char os_toascii[256];
  -extern const unsigned char os_toebcdic[256];
  -void ebcdic2ascii(void *dest, const void *srce, size_t count);
  -void ascii2ebcdic(void *dest, const void *srce, size_t count);
  +#include <ap_ebcdic.h>
  +
  +#endif /*EBCDIC_H*/
  
  
  
  1.5       +0 -37     apache-1.3/src/os/os390/os.c
  
  Index: os.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/os390/os.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -u -r1.4 -r1.5
  --- os.c	2001/01/15 17:06:21	1.4
  +++ os.c	2001/03/09 10:10:46	1.5
  @@ -65,40 +65,3 @@
   #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
  -     * "magic" type prefix was invented: text/x-ascii-{plain,html,...}
  -     * If we detect one of these content types here, we simply correct
  -     * the type to the real text/{plain,html,...} type. Otherwise, we
  -     * 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);
  -
  -    /* 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);
  -        else
  -	    /* 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.2       +0 -5      apache-1.3/src/os/os390/os.h
  
  Index: os.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/os390/os.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- os.h	1999/12/09 17:12:14	1.1
  +++ os.h	2001/03/09 10:10:46	1.2
  @@ -32,9 +32,4 @@
   #define ap_os_is_filename_valid(f)          (1)
   #define ap_os_kill(pid, sig)                kill(pid, sig)
   
  -/* Sorry if this is ugly, but the include order doesn't allow me
  - * to use request_rec here... */
  -struct request_rec;
  -extern int ap_checkconv(struct request_rec *r);
  -
   #endif /*! APACHE_OS_H*/
  
  
  
  1.3       +1 -2      apache-1.3/src/os/tpf/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/tpf/Makefile.tmpl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- Makefile.tmpl	1999/04/27 20:36:37	1.2
  +++ Makefile.tmpl	2001/03/09 10:10:48	1.3
  @@ -3,7 +3,7 @@
   INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
   LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
   
  -OBJS=   os.o os-inline.o ebcdic.o cgetop.o
  +OBJS=   os.o os-inline.o cgetop.o
   
   LIB=	libos.a
   
  @@ -36,7 +36,6 @@
   
   $(OBJS): Makefile
   os.o:	os.c os-inline.c $(INCDIR)/ap_config.h
  -ebcdic.o: ebcdic.c
   cgetop.o: cgetop.c
   # DO NOT REMOVE
   os.o:	os.c
  
  
  
  1.7       +0 -171    apache-1.3/src/os/tpf/ebcdic.c
  
  	<<Binary file>>
  
  
  1.3       +4 -5      apache-1.3/src/os/tpf/ebcdic.h
  
  Index: ebcdic.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/tpf/ebcdic.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- ebcdic.h	2000/01/07 16:04:14	1.2
  +++ ebcdic.h	2001/03/09 10:10:50	1.3
  @@ -1,7 +1,6 @@
  -#include <sys/types.h>
  +#ifndef EBCDIC_H
  +#define EBCDIC_H  "$Id: ebcdic.h,v 1.3 2001/03/09 10:10:50 martin Exp $"
   
  -extern const unsigned char os_toascii[256];
  -extern const unsigned char os_toebcdic[256];
  -void ebcdic2ascii(void *dest, const void *srce, size_t count);
  -void ascii2ebcdic(void *dest, const void *srce, size_t count);
  +#include <ap_ebcdic.h>
   
  +#endif /*EBCDIC_H*/
  
  
  
  1.11      +0 -45     apache-1.3/src/os/tpf/os.c
  
  Index: os.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/tpf/os.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -u -r1.10 -r1.11
  --- os.c	2001/02/01 13:07:33	1.10
  +++ os.c	2001/03/09 10:10:51	1.11
  @@ -78,51 +78,6 @@
   
   static FILE *sock_fp;
   
  -/* 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
  -     * "magic" type prefix was invented: text/x-ascii-{plain,html,...}
  -     * If we detect one of these content types here, we simply correct
  -     * the type to the real text/{plain,html,...} type. Otherwise, we
  -     * 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);
  -
  -    /* 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->method_number == M_PUT)
  -                   ap_bsetflag(r->connection->client, B_ASCII2EBCDIC, 0);
  -            }
  -
  -        else
  -	    /* translate EBCDIC to ASCII */
  -	    convert_to_ascii = 1;
  -    }
  -    else{
  -           if (r->method_number == M_PUT)
  -               ap_bsetflag(r->connection->client, B_ASCII2EBCDIC, 0);
  -               /* don't translate non-text files to EBCDIC */
  -    }
  -    /* Enable conversion if it's a text document */
  -    ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, convert_to_ascii);
  -
  -    return convert_to_ascii;
  -}
  -
   int tpf_select(int maxfds, fd_set *reads, fd_set *writes, fd_set *excepts, struct timeval *tv)
   {
   /* We're going to force our way through select.  We're only interested reads and TPF allows
  
  
  
  1.12      +0 -5      apache-1.3/src/os/tpf/os.h
  
  Index: os.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/tpf/os.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -u -r1.11 -r1.12
  --- os.h	2001/02/01 13:07:34	1.11
  +++ os.h	2001/03/09 10:10:51	1.12
  @@ -38,11 +38,6 @@
   #define ap_os_is_filename_valid(f)          (1)
   #define ap_os_kill(pid, sig)                kill(pid, sig)
   
  -/* Sorry if this is ugly, but the include order doesn't allow me
  - * to use request_rec here... */
  -struct request_rec;
  -extern int ap_checkconv(struct request_rec *r);
  - 
   #include <strings.h>
   #ifndef __strings_h
   
  
  
  
  1.45      +3 -3      apache-1.3/src/support/ab.c
  
  Index: ab.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/support/ab.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -u -r1.44 -r1.45
  --- ab.c	2001/01/15 17:06:33	1.44
  +++ ab.c	2001/03/09 10:10:55	1.45
  @@ -128,7 +128,7 @@
   #include "ap_config.h"
   #include "ap.h"
   #ifdef CHARSET_EBCDIC
  -#include "ebcdic.h"
  +#include "ap_ebcdic.h"
   #endif
   #include <fcntl.h>
   #ifndef MPE
  @@ -887,14 +887,14 @@
   static void copyright(void)
   {
       if (!use_html) {
  -	printf("This is ApacheBench, Version %s\n", VERSION " <$Revision: 1.44 $> apache-1.3");
  +	printf("This is ApacheBench, Version %s\n", VERSION " <$Revision: 1.45 $> apache-1.3");
   	printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
   	printf("Copyright (c) 1998-2000 The Apache Group, http://www.apache.org/\n");
   	printf("\n");
       }
       else {
   	printf("<p>\n");
  -	printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-1.3<br>\n", VERSION, "$Revision: 1.44 $");
  +	printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-1.3<br>\n", VERSION, "$Revision: 1.45 $");
   	printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
   	printf(" Copyright (c) 1998-2000 The Apache Group, http://www.apache.org/<br>\n");
   	printf("</p>\n<p>\n");
  
  
  

Mime
View raw message