[2286] | 1 | /**********************************************************************
|
---|
| 2 | *
|
---|
| 3 | * httpsend.h
|
---|
| 4 | * Copyright (C) 1996
|
---|
| 5 | *
|
---|
| 6 | * A component of the fnord webserver written by [email protected].
|
---|
| 7 | *
|
---|
| 8 | * Altered for use with the Greenstone digital library software by the
|
---|
| 9 | * New Zealand Digital Library Project at the University of Waikato,
|
---|
| 10 | * New Zealand.
|
---|
| 11 | *
|
---|
| 12 | * This program is free software; you can redistribute it and/or modify
|
---|
| 13 | * it under the terms of the GNU General Public License as published by
|
---|
| 14 | * the Free Software Foundation; either version 2 of the License, or
|
---|
| 15 | * (at your option) any later version.
|
---|
| 16 | *
|
---|
| 17 | * This program is distributed in the hope that it will be useful,
|
---|
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 20 | * GNU General Public License for more details.
|
---|
| 21 | *
|
---|
| 22 | * You should have received a copy of the GNU General Public License
|
---|
| 23 | * along with this program; if not, write to the Free Software
|
---|
| 24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
| 25 | *
|
---|
| 26 | *********************************************************************/
|
---|
[611] | 27 |
|
---|
| 28 | /*
|
---|
| 29 | Module Name: HTTP Send
|
---|
| 30 | Purpose: Functions for sending HTTP responses to 1.X requests
|
---|
| 31 | Public Functions:
|
---|
| 32 | SendHTTPError
|
---|
| 33 | Notes: Considering adding a version number parameter to these functions. Right
|
---|
| 34 | now the way people are implementing HTTP/1.1 is by adding the new stuff
|
---|
| 35 | to 1.0 requests. I don't know of any browsers sending 1.1 requests yet.
|
---|
| 36 | */
|
---|
| 37 |
|
---|
| 38 | /*
|
---|
| 39 | Function Name: Send HTTP Error
|
---|
| 40 | Purpose: Sends a given error message to the client with either the error file
|
---|
| 41 | as a body or a default error message body. Common and refenece log
|
---|
| 42 | entries are written, but not to the count log.
|
---|
| 43 | Parameters:
|
---|
| 44 | ErrorNum - HTTP error number to send
|
---|
[2286] | 45 | ErrorTitleStr - Title of the error
|
---|
[611] | 46 | ErrorDescStr - String describing the error
|
---|
| 47 | RequestInfo - HTTP request information (see httpreq.h)
|
---|
| 48 | RequestFields - Parsed HTTP header info (see httpreq.h)
|
---|
| 49 | */
|
---|
[2286] | 50 | void SendHTTPError(int ErrorNum, char *ErrorTitleStr, char *ErrorDescStr,
|
---|
| 51 | RequestInfoT &RequestInfo, RequestFieldsT &RequestFields);
|
---|