-const char parsers_rcs[] = "$Id: parsers.c,v 1.19 2001/07/25 17:21:54 oes Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.20 2001/07/30 22:08:36 jongfoster Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
*
* Revisions :
* $Log: parsers.c,v $
+ * Revision 1.20 2001/07/30 22:08:36 jongfoster
+ * Tidying up #defines:
+ * - All feature #defines are now of the form FEATURE_xxx
+ * - Permanently turned off WIN_GUI_EDIT
+ * - Permanently turned on WEBDAV and SPLIT_PROXY_ARGS
+ *
* Revision 1.19 2001/07/25 17:21:54 oes
* client_uagent now saves copy of User-Agent: header value
*
{ "from:", 5, client_from },
{ "cookie:", 7, client_send_cookie },
{ "x-forwarded-for:", 16, client_x_forwarded },
- { "proxy-connection:", 17, crumble },
#ifdef FEATURE_DENY_GZIP
{ "Accept-Encoding: gzip", 21, crumble },
#endif /* def FEATURE_DENY_GZIP */
{ "Host:", 5, client_host },
#endif /* def FEATURE_FORCE_LOAD */
/* { "if-modified-since:", 18, crumble }, */
+ { "Keep-Alive:", 11, crumble },
+ { "connection:", 11, crumble },
+ { "proxy-connection:", 17, crumble },
{ NULL, 0, NULL }
};
client_cookie_adder,
client_x_forwarded_adder,
client_xtra_adder,
+ connection_close_adder,
NULL
};
void (* const add_server_headers[])(struct client_state *) = {
+ connection_close_adder,
NULL
};
(*f)(csp);
}
- /* add the blank line at the end of the header, if necessary */
- if ( (csp->headers->last == NULL)
- || (csp->headers->last->str == NULL)
- || (*csp->headers->last->str != '\0') )
- {
- enlist(csp->headers, "");
- }
-
hdr = list_to_text(csp->headers);
return(hdr);
}
+/*********************************************************************
+ *
+ * Function : connection_close_adder
+ *
+ * Description : Adds a "Connection: close" header to csp->headers
+ * as a temporary fix for the needed but missing HTTP/1.1
+ * support. Called from `sed'.
+ * FIXME: This whole function shouldn't be neccessary!
+ *
+ * Parameters :
+ * 1 : csp = Current client state (buffers, headers, etc...)
+ *
+ * Returns : N/A
+ *
+ *********************************************************************/
+void connection_close_adder(struct client_state *csp)
+{
+ enlist(csp->headers, strdup("Connection: close"));
+
+}
+
+
/*********************************************************************
*
* Function : server_set_cookie