Commit 5b616118 authored by Martin Kraemer's avatar Martin Kraemer
Browse files

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>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@88479 13f79535-47bb-0310-9956-ffa450edef68
parent 5284ae43
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment