cparser pointed out it doesn't actually use csp.
-const char jcc_rcs[] = "$Id: jcc.c,v 1.225 2009/02/19 18:09:32 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.226 2009/03/01 18:28:24 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
*
* Revisions :
* $Log: jcc.c,v $
+ * Revision 1.226 2009/03/01 18:28:24 fabiankeil
+ * Help clang understand that we aren't dereferencing
+ * NULL pointers here.
+ *
* Revision 1.225 2009/02/19 18:09:32 fabiankeil
* Unbreak build without FEATURE_CONNECTION_KEEP_ALIVE.
* Noticed by David.
log_error(LOG_LEVEL_INFO, "Rewrite detected: %s", csp->headers->first->str);
free_http_request(http);
- err = parse_http_request(csp->headers->first->str, http, csp);
+ err = parse_http_request(csp->headers->first->str, http);
if (JB_ERR_OK != err)
{
log_error(LOG_LEVEL_ERROR, "Couldn't parse rewritten request: %s.",
}
#endif /* def FEATURE_FORCE_LOAD */
- err = parse_http_request(req, http, csp);
+ err = parse_http_request(req, http);
freez(req);
if (JB_ERR_OK != err)
{
-const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.45 2008/06/21 21:19:18 fabiankeil Exp $";
+const char urlmatch_rcs[] = "$Id: urlmatch.c,v 1.46 2009/02/11 19:31:32 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.c,v $
*
* Revisions :
* $Log: urlmatch.c,v $
+ * Revision 1.46 2009/02/11 19:31:32 fabiankeil
+ * Reject request lines that end with neither HTTP/1.0 nor HTTP/1.1.
+ *
* Revision 1.45 2008/06/21 21:19:18 fabiankeil
* Silence bogus compiler warning.
*
* Parameters :
* 1 : req = HTTP request line to break down
* 2 : http = pointer to the http structure to hold elements
- * 3 : csp = Current client state (buffers, headers, etc...)
*
* Returns : JB_ERR_OK on success
* JB_ERR_MEMORY on out of memory
* or >100 domains deep.
*
*********************************************************************/
-jb_err parse_http_request(const char *req,
- struct http_request *http,
- const struct client_state *csp)
+jb_err parse_http_request(const char *req, struct http_request *http)
{
char *buf;
char *v[10]; /* XXX: Why 10? We should only need three. */
#ifndef URLMATCH_H_INCLUDED
#define URLMATCH_H_INCLUDED
-#define URLMATCH_H_VERSION "$Id: urlmatch.h,v 1.11 2008/05/04 13:30:55 fabiankeil Exp $"
+#define URLMATCH_H_VERSION "$Id: urlmatch.h,v 1.12 2008/05/04 16:18:32 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/urlmatch.h,v $
*
* Revisions :
* $Log: urlmatch.h,v $
+ * Revision 1.12 2008/05/04 16:18:32 fabiankeil
+ * Provide parse_http_url() with a third parameter to specify
+ * whether or not URLs without protocol are acceptable.
+ *
* Revision 1.11 2008/05/04 13:30:55 fabiankeil
* Streamline parse_http_url()'s prototype.
*
extern void free_http_request(struct http_request *http);
extern jb_err init_domain_components(struct http_request *http);
-extern jb_err parse_http_request(const char *req,
- struct http_request *http,
- const struct client_state *csp);
+extern jb_err parse_http_request(const char *req, struct http_request *http);
extern jb_err parse_http_url(const char *url,
struct http_request *http,
int require_protocol);