/
WebAccessLog.asn1
92 lines (86 loc) · 2.67 KB
/
WebAccessLog.asn1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
-- Copyright 2009 Google Inc.
-- Author: Romain Lenglet <romain.lenglet@berabera.info>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- ASN.1 definitions for the abstract representation of web access
-- logs in the common log format and the combined log format.
WebAccessLog DEFINITIONS IMPLICIT TAGS ::=
BEGIN
-- Network address, adapted from the definition of TransportAddress in
-- ITU-T H.225.0 (H.323):
NetworkAddress ::= CHOICE {
hostname UTF8String,
ip-address [0] OCTET STRING(SIZE (4)),
ip6-address [1] OCTET STRING(SIZE (16)),
...
}
-- The HTTP/1/1 status code definitions, cf. IETF RFC 2616:
HTTPStatusCode ::= ENUMERATED {
continue(100),
switching-protocols(101),
ok(200),
created(201),
accepted(202),
non-authoritative-information(203),
no-content(204),
reset-content(205),
partial-content(206),
multiple-choices(300),
moved-permanently(301),
found(302),
see-other(303),
not-modified(304),
use-proxy(305),
-- unused(306),
temporary-redirect(307),
unauthorized(401),
payment-required(402),
forbidden(403),
not-found(404),
method-not-allowed(405),
not-acceptable(406),
proxy-authentication-required(407),
request-timeout(408),
conflict(409),
gone(410),
length-required(411),
precondition-failed(412),
request-entity-too-large(413),
request-uri-too-long(414),
unsupported-media-type(415),
requested-range-not-satisfiable(416),
expectation-failed(417),
not-implemented(501),
bad-gateway(502),
service-unavailable(503),
gateway-timeout(504),
http-version-not-supported(505),
...
}
-- A single line / entry in a log in the common or extended log
-- format, as generated by W3C httpd, Apache, and other HTTP servers:
LogEntry ::= SEQUENCE {
-- Entries in the common log format:
remote-host NetworkAddress,
client-identity [0] UTF8String OPTIONAL,
auth-user [1] UTF8String OPTIONAL,
time GeneralizedTime,
request UTF8String,
status HTTPStatusCode,
length INTEGER (0..MAX) OPTIONAL,
-- Additional entries in the combined log format:
referrer [2] UTF8String OPTIONAL,
user-agent [3] UTF8String OPTIONAL,
...
}
END