/*
 * response.h
 * File Revision 0
 * Strings used in responses.
 * (c) 2000 Jacob Lundberg, jacob@chaos2.org
 */


/*
 * 2000.11.27	Initial implementation
 */


#ifndef __RESPONSE_H__
#define __RESPONSE_H__


/* Buffering for request printing. */
#define  SV_REQ_BUF_SIZE        4096
static char sv_req_buffer[SV_REQ_BUF_SIZE];


/* 200 no errors */
#define  HEAD_200               \
"HTTP/1.1 200 OK
Date: %s
Server: " SERVER_ID "
Last-Modified: %s
Accept-Ranges: bytes
Content-Length: %li
Connection: close
Content-Type: %s

"


/* 400 bad request */
#define  HEAD_400               \
"HTTP/1.1 400 Bad Request
Date: %s
Server: " SERVER_ID "
Connection: close
Content-Type: text/html

"
#define  BODY_400               \
"<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand:
<P><PRE>%s</PRE>
</BODY></HTML>
"


/* 403 forbidden */
#define  HEAD_403               \
"HTTP/1.1 403 Forbidden
Date: %s
Server: " SERVER_ID "
Connection: close
Content-Type: text/html

"
#define  BODY_403               \
"<HTML><HEAD>
<TITLE>403 Forbidden</TITLE>
</HEAD><BODY>
<H1>Forbidden</H1>
You don't have permission to access %s on this server.<P>
</BODY></HTML>
"


/* 404 not found */
#define  HEAD_404               \
"HTTP/1.1 404 Not Found
Date: %s
Server: " SERVER_ID "
Connection: close
Content-Type: text/html

"
#define  BODY_404               \
"<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL %s was not found on this server.<P>
</BODY></HTML>
"


/* 500 internal server error */
#define  HEAD_500               \
"HTTP/1.1 500 Internal Server Error
Date: %s
Server: " SERVER_ID "
Connection: close
Content-Type: text/html

"
#define  BODY_500               \
"<HTML><HEAD>
<TITLE>500 Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error</H1>
The server encountered an internal error
<BR>and was unable to process your request.
<P>The server recieved error number %i.
<BR>Please contact the server administrator.
</BODY></HTML>
"


/* 501 method not implemented */
#define  HEAD_501               \
"HTTP/1.1 501 Method Not Implemented
Date: %s
Server: " SERVER_ID "
Connection: close
Content-Type: text/html

"
#define  BODY_501               \
"<HTML><HEAD>
<TITLE>501 Method Not Implemented</TITLE>
</HEAD><BODY>
<H1>Method Not Implemented</H1>
Invalid method in request:
<P><PRE>%s</PRE>
</BODY></HTML>
"


#endif /* ndef __RESPONSE_H__ */

