httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@ast.cam.ac.uk (David Robinson)
Subject Re: Number of Virtual Servers
Date Tue, 19 Dec 1995 17:38:00 GMT
For reference: the current log format is
remote_host ident authuser [date-time zome] "request-line" status bytes

remote_host: hostname, or IP address if not available
data-time: dd/Mmm/yyyy:hh:mm:ss
zone: +dddd  or -dddd

I suggest the following:

A logfile has the format
header* record*

The header defines the semantics of the extension fields.
header := '#' header-command NL

header-command: "columns" 1* (' ' http-header)

A logfile record has the following format:

record := 
    date ' ' status ' ' bytes ' ' requestline ' ' virtual-host ' ' remote-host
    ident auth-user ( ' ' extension-field)* NL

date := year '-' month '-' day ':' hour ':' minute ':' second ' ' zone
year  := 4DIGIT
month := 2DIGIT
day   := 2DIGIT
hour  := 2DIGIT
second:= 2DIGIT
zone  := sign 4DIGIT
sign  := '+' | '-'

example date:= 1995-19-12:17:01:45 +0000

status: status code for returned document
status := 3DIGIT

bytes := 1*DIGIT

requestline := quoted-data

virtual-host := host | "-"
remote-host := host
host := hostname | ip-addr
ident := quoted-data | 
auth-user := data

extension-field := quoted-data | '"-"'

quoted-data is enclosed in double quotes, and any occurence of \ or " must
be escaped with \


Example (linewrapped for clarity)
#columns Referer UserAgent
1995-19-12:17:01:45 +0000 200 3119 "GET /page.html" - 12.34.45.67
 "-" - "Chimera/1.65" "/index.html"
1995-19-12:17:01:46 +0000 404 - "DEBUG \"on\"" - hacker.net "-" ahacker "-" "-"

It would be easy to write a program which converted this back to CLF.

Notes:
Fields from HTTP headers are enclosed in quotes, as they can contain spaces.
Fields enclosed in quotes are _always_ enclosed in quotes even if not
available, to simplify parsing.
The fixed length fields are first in each record.

 David.

Mime
View raw message