[EBCDIC] Port Paul Gilmartin's CRLF patch from 1.3. This replaces most

of the \015, \012, and \015\012 constants with macros.
Submitted by:	Greg Ames
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84998 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeff Trawick
2000-04-20 14:36:01 +00:00
parent acec159ebf
commit cc6e027c47
5 changed files with 37 additions and 23 deletions

View File

@ -487,8 +487,12 @@ API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
/* Delete terminal (CR?)LF */
p = strlen(w);
/* Indeed, the host's '\n':
'\012' for UNIX; '\015' for MacOS; '\025' for OS/390
-- whatever the script generates.
*/
if (p > 0 && w[p - 1] == '\n') {
if (p > 1 && w[p - 2] == '\015') {
if (p > 1 && w[p - 2] == CR) {
w[p - 2] = '\0';
}
else {