ebcdic.html revision 091caae3b2ebdb760c98575d0d5e349cd686f913
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik BGCOLOR="#FFFFFF"
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik TEXT="#000000"
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik LINK="#0000FF"
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik VLINK="#000080"
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik ALINK="#FF0000"
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik<!--#include virtual="header.html" -->
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik<H1 ALIGN="CENTER">Overview of the Apache EBCDIC Port</H1>
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik Version 1.3 of the Apache HTTP Server is the first version which
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik includes a port to a (non-ASCII) mainframe machine which uses
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik the EBCDIC character set as its native codeset.<BR>
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik (It is the SIEMENS NIXDORF family of mainframes running the
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik <A HREF="http://www.sni.de/servers/bs2osd/osdbc_us.htm">BS2000/OSD
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik operating system</A>. This mainframe OS nowadays features a
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik SVR4-derived POSIX subsystem).
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik The port was started initially to
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik <LI> prove the feasibility of porting
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik <A HREF="http://dev.apache.org/">the Apache HTTP server</A>
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik to this platform
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik <LI> find a "worthy and capable" successor for the venerable
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik <A HREF="http://www.w3.org/Daemon/">CERN-3.0</A> daemon
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik (which was ported a couple of years ago), and to
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik <LI> prove that Apache's preforking process model can on this platform
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik easily outperform the accept-fork-serve model used by CERN by a
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik factor of 5 or more.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik This document serves as a rationale to describe some of the design
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik decisions of the port to this machine.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik One objective of the EBCDIC port was to maintain enough backwards
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik compatibility with the (EBCDIC) CERN server to make the transition to
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik the new server attractive and easy. This required the addition of
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik a configurable method to define whether a HTML document was stored
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik in ASCII (the only format accepted by the old server) or in EBCDIC
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik (the native document format in the POSIX subsystem, and therefore
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik the only realistic format in which the other POSIX tools like grep
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik or sed could operate on the documents). The current solution to
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik this is a "pseudo-MIME-format" which is intercepted and
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik interpreted by the Apache server (see below). Future versions
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik might solve the problem by defining an "ebcdic-handler" for all
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik documents which must be converted.
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik Since all Apache input and output is based upon the BUFF data type
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik and its methods, the easiest solution was to add the conversion to
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik the BUFF handling routines. The conversion must be settable at any
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik time, so a BUFF flag was added which defines whether a BUFF object
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik has currently enabled conversion or not. This flag is modified at
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik several points in the HTTP protocol:
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik <LI><STRONG>set</STRONG> before a request is received (because the
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik request and the request header lines are always in ASCII
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik <LI><STRONG>set/unset</STRONG> when the request body is
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik received - depending on the content type of the request body
8d22687fbdc540bd0b4d05fd90d87fb6037f4b9fJorgen Austvik (because the request body may contain ASCII text or a binary file)
information etc.) whereas the file transfer parts (i.e., GIF
Server parsed files are always assumed to be in native (i.e.,
<!--#include virtual="footer.html" -->