httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter W <>
Subject Re: [PATCH] mod_log_config: expose r->protocol, r->method
Date Mon, 27 Sep 1999 21:36:42 GMT

Very good point. For this application, we didn't need to record the query
string, but I had also forgotten about it. Hmmm, how about %q for
query_string, generated by

static const char *log_query_string(request_rec *r, char *a) 
	return (r->args != NULL) ? ap_pstrcat(r->pool, "?", r->args, NULL)
				: "";

so that "%m %U%q %H"  == "%r", and the logging module would prepend "?" if
there was data, or log an empty char (i.e., nothing) if no query_string.


At 12:39pm Sep 27, 1999, Spidaman The Defenestrator wrote:

> The full request line would have the uri and the query string so having a
> log format that has "%m %U %H" would not replace %r, right?
> Meanwhile, back at the ranch...
> > For a recent project, we wanted to customize the log format and realized
> > that while %r refers to the full request line and %U refers to the uri,
> > there was no good way to refer to the method or protocol. 

> > 	%m => r->method		(mnemonic: "m" for "method")
> > 	%H => r->protocol	(mnemonic: "H" begins "HTTP/1.0")

View raw message