-const char cgi_rcs[] = "$Id: cgi.c,v 1.20 2001/09/13 23:40:36 jongfoster Exp $";
+const char cgi_rcs[] = "$Id: cgi.c,v 1.21 2001/09/13 23:53:03 jongfoster Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgi.c,v $
*
* Revisions :
* $Log: cgi.c,v $
+ * Revision 1.21 2001/09/13 23:53:03 jongfoster
+ * Support for both static and dynamically generated CGI pages.
+ * Correctly setting Last-Modified: and Expires: HTTP headers.
+ *
* Revision 1.20 2001/09/13 23:40:36 jongfoster
* (Cosmetic only) Indentation correction
*
*/
/* Get mem for response or fail*/
- if (NULL == ( rsp = zalloc(sizeof(*rsp))))
+ if (NULL == (rsp = alloc_http_response()))
{
return NULL;
}
struct http_response *rsp;
struct map * exports = default_exports(csp, NULL);
- if (NULL == ( rsp = (struct http_response *)zalloc(sizeof(*rsp))))
+ if (NULL == (rsp = alloc_http_response()))
{
return NULL;
}
}
+/*********************************************************************
+ *
+ * Function : alloc_http_response
+ *
+ * Description : Allocates a new http_response structure.
+ *
+ * Parameters : N/A
+ *
+ * Returns : pointer to a new http_response, or NULL.
+ *
+ *********************************************************************/
+struct http_response * alloc_http_response(void)
+{
+ return (struct http_response *) zalloc(sizeof(struct http_response));
+}
+
+
/*********************************************************************
*
* Function : free_http_response