>Number: 5440 >Category: mod_log-any >Synopsis: Code for logformat token %m seems missing... ? >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Tue Dec 7 19:50:00 PST 1999 >Last-Modified: >Originator: [EMAIL PROTECTED] >Organization: apache >Release: 1.3.9 >Environment: Solaris 2.5.1/Sun OS 5.5.1 Generic_103640-27 sun4m, gcc 2.7.2 >Description: Log config token %m is in the docs, and there's even a report for 1.3 where someone discusses using it, and shows code (presumably from an earlier 1.3) that has it. But mod_log_config.c distributed with 1.3.9 (downloaded Dec 3 15:47) definitely does NOT have it in there. >How-To-Repeat: View mod_log_config.c. >Fix: Here's my patch. It's all of 9 lines of code (of course, I'm pasting it into the window, so any tabs are now spaces): *** mod_log_config.c.orig Mon Jun 21 20:51:35 1999 --- mod_log_config.c Tue Dec 7 21:56:05 1999 *************** *** 126,131 **** --- 126,132 ---- * %...{Foobar}i: The contents of Foobar: header line(s) in the request * sent to the client. * %...l: remote logname (from identd, if supplied) + * %...m: request method * %...{Foobar}n: The contents of note "Foobar" from another module. * %...{Foobar}o: The contents of Foobar: header line(s) in the reply. * %...p: the port the request was served to *************** *** 313,318 **** --- 314,324 ---- return rvalue; } + static const char *log_request_method(request_rec *r, char *a) + { + return r->method; + } + static const char *log_request_line(request_rec *r, char *a) { /* NOTE: If the original request contained a password, we *************** *** 507,512 **** --- 513,521 ---- 'P', log_child_pid, 0 }, { + 'm', log_request_method, 0 + }, + { '\0' } }; >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, you need] [to include <[EMAIL PROTECTED]> in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]