-const char cgi_rcs[] = "$Id: cgi.c,v 1.104 2008/03/26 18:07:06 fabiankeil Exp $";
+const char cgi_rcs[] = "$Id: cgi.c,v 1.105 2008/04/17 14:40:47 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgi.c,v $
*
* Revisions :
* $Log: cgi.c,v $
+ * Revision 1.105 2008/04/17 14:40:47 fabiankeil
+ * Provide get_http_time() with the buffer size so it doesn't
+ * have to blindly assume that the buffer is big enough.
+ *
* Revision 1.104 2008/03/26 18:07:06 fabiankeil
* Add hostname directive. Closes PR#1918189.
*
* JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
-jb_err cgi_error_disabled(struct client_state *csp,
+jb_err cgi_error_disabled(const struct client_state *csp,
struct http_response *rsp)
{
struct map *exports;
* JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
-jb_err cgi_error_no_template(struct client_state *csp,
+jb_err cgi_error_no_template(const struct client_state *csp,
struct http_response *rsp,
const char *template_name)
{
* JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
-jb_err cgi_error_unknown(struct client_state *csp,
+jb_err cgi_error_unknown(const struct client_state *csp,
struct http_response *rsp,
jb_err error_to_report)
{
* JB_ERR_MEMORY on out-of-memory error.
*
*********************************************************************/
-jb_err cgi_error_bad_param(struct client_state *csp,
+jb_err cgi_error_bad_param(const struct client_state *csp,
struct http_response *rsp)
{
struct map *exports;
* JB_ERR_FILE if the template file cannot be read
*
*********************************************************************/
-jb_err template_load(struct client_state *csp, char **template_ptr,
+jb_err template_load(const struct client_state *csp, char **template_ptr,
const char *templatename, int recursive)
{
jb_err err;
* JB_ERR_MEMORY on out-of-memory error
*
*********************************************************************/
-jb_err template_fill_for_cgi(struct client_state *csp,
+jb_err template_fill_for_cgi(const struct client_state *csp,
const char *templatename,
struct map *exports,
struct http_response *rsp)
#ifndef CGI_H_INCLUDED
#define CGI_H_INCLUDED
-#define CGI_H_VERSION "$Id: cgi.h,v 1.33 2007/01/28 13:41:17 fabiankeil Exp $"
+#define CGI_H_VERSION "$Id: cgi.h,v 1.34 2008/04/17 14:40:48 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgi.h,v $
*
* Revisions :
* $Log: cgi.h,v $
+ * Revision 1.34 2008/04/17 14:40:48 fabiankeil
+ * Provide get_http_time() with the buffer size so it doesn't
+ * have to blindly assume that the buffer is big enough.
+ *
* Revision 1.33 2007/01/28 13:41:17 fabiankeil
* - Add HEAD support to finish_http_response.
* - Add error favicon to internal HTML error messages.
extern jb_err map_block_keep (struct map *exports, const char *name);
extern jb_err map_conditional (struct map *exports, const char *name, int choose_first);
-extern jb_err template_load(struct client_state *csp, char ** template_ptr,
+extern jb_err template_load(const struct client_state *csp, char ** template_ptr,
const char *templatename, int recursive);
extern jb_err template_fill(char ** template_ptr, const struct map *exports);
-extern jb_err template_fill_for_cgi(struct client_state *csp,
+extern jb_err template_fill_for_cgi(const struct client_state *csp,
const char *templatename,
struct map *exports,
struct http_response *rsp);
extern struct http_response *cgi_error_memory(void);
extern jb_err cgi_redirect (struct http_response * rsp, const char *target);
-extern jb_err cgi_error_no_template(struct client_state *csp,
+extern jb_err cgi_error_no_template(const struct client_state *csp,
struct http_response *rsp,
const char *template_name);
-extern jb_err cgi_error_bad_param(struct client_state *csp,
+extern jb_err cgi_error_bad_param(const struct client_state *csp,
struct http_response *rsp);
-extern jb_err cgi_error_disabled(struct client_state *csp,
+extern jb_err cgi_error_disabled(const struct client_state *csp,
struct http_response *rsp);
-extern jb_err cgi_error_unknown(struct client_state *csp,
+extern jb_err cgi_error_unknown(const struct client_state *csp,
struct http_response *rsp,
jb_err error_to_report);