25 |
{ |
{ |
26 |
my $i = 1; |
my $i = 1; |
27 |
for ( |
for ( |
28 |
qw/status/, ## CGI header |
qw/status x-cgi-/, ## CGI header |
29 |
qw/man c-man opt c-opt ext c-ext |
qw/man c-man opt c-opt ext c-ext |
30 |
cache-control connection date pragma transfer-encoding upgrade trailer via |
cache-control connection date pragma transfer-encoding upgrade trailer via |
31 |
keep-alive/, ## General-Headers |
keep-alive/, ## General-Headers |
35 |
max-forwards proxy-authorization range referer te user-agent/, ## Request-Headers |
max-forwards proxy-authorization range referer te user-agent/, ## Request-Headers |
36 |
qw/accept-ranges age location proxy-authenticate retry-after server vary |
qw/accept-ranges age location proxy-authenticate retry-after server vary |
37 |
warning www-authenticate alternates/, ## Response-Headers |
warning www-authenticate alternates/, ## Response-Headers |
38 |
qw/allow etag expires last-modified link window-target |
qw/allow etag expires last-modified base link window-target |
39 |
mime-version derived-from base content-/, ## Entity-Headers |
derived-from mime-version content-/, ## Entity-Headers |
40 |
) { |
) { |
41 |
$OPTION{field_sort_good_practice_order}->{$_} = $i++; |
$OPTION{field_sort_good_practice_order}->{$_} = $i++; |
42 |
} |
} |
|
## default = 999 |
|
|
$i = 1000; |
|
|
for (qw/list- mime-version content- xref/) { |
|
|
$OPTION{field_sort_good_practice_order}->{$_} = $i++; |
|
|
} |
|
43 |
} |
} |
44 |
|
|
45 |
$OPTION{goodcase} = { |
$OPTION{goodcase} = { |
53 |
':default' => ['Message::Field::Unstructured'], |
':default' => ['Message::Field::Unstructured'], |
54 |
status => ['Message::Field::Status'], |
status => ['Message::Field::Status'], |
55 |
|
|
56 |
## HTTP-Date / delta-second |
## HTTP-Date / delta-econd |
57 |
date => ['Message::Field::Date'], |
age => ['Message::Field::Date'], ## ds |
58 |
expires => ['Message::Field::Date'], |
date => ['Message::Field::Date'], ## hd |
59 |
|
expires => ['Message::Field::Date'], ## hd / ds |
60 |
'if-modified-since' => ['Message::Field::Date'], |
'if-modified-since' => ['Message::Field::Date'], |
61 |
'if-unmodified-since' => ['Message::Field::Date'], |
'if-unmodified-since' => ['Message::Field::Date'], |
62 |
'last-modified' => ['Message::Field::Date'], |
'last-modified' => ['Message::Field::Date'], ## hd |
63 |
|
|
64 |
p3p => ['Message::Field::Params'], |
p3p => ['Message::Field::Params'], |
65 |
|
refresh => ['Message::Field::ValueParams'], |
66 |
'window-target' => ['Message::Field::ValueParams'], |
'window-target' => ['Message::Field::ValueParams'], |
67 |
'mime-version' => ['Message::Field::Numval'], |
'mime-version' => ['Message::Field::Numval'], |
68 |
from => ['Message::Field::Addresses'], |
from => ['Message::Field::Addresses'], |
69 |
|
host => ['Message::Field::Domain',{ |
70 |
|
-format_ipv4 => '%vd', |
71 |
|
-format_ipv6 => '[%s]', |
72 |
|
-output_port => 1, |
73 |
|
-use_comment => 0, |
74 |
|
-use_port => 1, |
75 |
|
}], |
76 |
|
|
77 |
## product |
## product |
78 |
server => ['Message::Field::UA'], |
server => ['Message::Field::UA'], |
79 |
'user-agent' => ['Message::Field::UA'], |
'user-agent' => ['Message::Field::UA'], |
80 |
|
|
81 |
## Comma Separated List |
## Comma Separated List |
82 |
|
accept => ['Message::Field::CSV',{ |
83 |
|
-is_quoted_string => 0, |
84 |
|
-use_comment => 0, |
85 |
|
-value_type => {'*default' => ['Message::Field::ValueParams']}, |
86 |
|
}], |
87 |
|
'accept-charset' => ['Message::Field::CSV',{ |
88 |
|
-is_quoted_string => 0, |
89 |
|
-use_comment => 0, |
90 |
|
-value_type => {'*default' => ['Message::Field::ValueParams']}, |
91 |
|
}], |
92 |
|
'accept-encoding' => ['Message::Field::CSV',{ |
93 |
|
-is_quoted_string => 0, |
94 |
|
-use_comment => 0, |
95 |
|
-value_type => {'*default' => ['Message::Field::ValueParams']}, |
96 |
|
}], |
97 |
|
'accept-language' => ['Message::Field::CSV',{ |
98 |
|
-is_quoted_string => 0, |
99 |
|
-use_comment => 0, |
100 |
|
-value_type => {'*default' => ['Message::Field::ValueParams']}, |
101 |
|
}], |
102 |
|
'accept-range' => ['Message::Field::CSV',{ |
103 |
|
-is_quoted_string => 0, |
104 |
|
-use_comment => 0, |
105 |
|
-value_type => {'*default' => ['Message::Field::ValueParams']}, |
106 |
|
}], |
107 |
|
'cache-control' => ['Message::Field::CSV',{ |
108 |
|
-is_quoted_string => 0, |
109 |
|
-use_comment => 0, |
110 |
|
-value_type => {'*default' => ['Message::Field::ValueParams']}, |
111 |
|
}], |
112 |
link => ['Message::Field::CSV'], |
link => ['Message::Field::CSV'], |
113 |
|
man => ['Message::Field::CSV',{ |
114 |
|
-is_quoted_string => 0, |
115 |
|
-use_comment => 0, |
116 |
|
-value_type => {'*default' => ['Message::Field::ValueParams']}, |
117 |
|
}], |
118 |
|
'c-man' => ['Message::Field::CSV',{ |
119 |
|
-is_quoted_string => 0, |
120 |
|
-use_comment => 0, |
121 |
|
-value_type => {'*default' => ['Message::Field::ValueParams']}, |
122 |
|
}], |
123 |
|
opt => ['Message::Field::CSV',{ |
124 |
|
-is_quoted_string => 0, |
125 |
|
-use_comment => 0, |
126 |
|
-value_type => {'*default' => ['Message::Field::ValueParams']}, |
127 |
|
}], |
128 |
|
'c-opt' => ['Message::Field::CSV',{ |
129 |
|
-is_quoted_string => 0, |
130 |
|
-use_comment => 0, |
131 |
|
-value_type => {'*default' => ['Message::Field::ValueParams']}, |
132 |
|
}], |
133 |
|
te => ['Message::Field::CSV',{ |
134 |
|
-is_quoted_string => 0, |
135 |
|
-use_comment => 0, |
136 |
|
-value_type => {'*default' => ['Message::Field::ValueParams']}, |
137 |
|
}], |
138 |
|
trailer => ['Message::Field::CSV',{ |
139 |
|
-output_comment => 0, |
140 |
|
-value_case_sensible => 1, |
141 |
|
}], |
142 |
|
'transfer-encoding' => ['Message::Field::CSV',{ |
143 |
|
-output_comment => 0, |
144 |
|
-value_case_sensible => 1, |
145 |
|
}], |
146 |
|
upgrade => ['Message::Field::CSV'], ## 1#product |
147 |
uri => ['Message::Field::CSV'], |
uri => ['Message::Field::CSV'], |
148 |
man => ['Message::Field::CSV'], |
vary => ['Message::Field::CSV',{ |
149 |
opt => ['Message::Field::CSV'], |
-output_comment => 0, |
150 |
|
-value_case_sensible => 1, |
151 |
|
}], |
152 |
warning => ['Message::Field::CSV',{ |
warning => ['Message::Field::CSV',{ |
153 |
-is_quoted_string => 0, |
-is_quoted_string => 0, |
154 |
-use_comment => 0, |
-use_comment => 0, |
187 |
$Message::Header::NS_phname2uri{$OPTION{namespace_phname}} = $OPTION{namespace_uri}; |
$Message::Header::NS_phname2uri{$OPTION{namespace_phname}} = $OPTION{namespace_uri}; |
188 |
$Message::Header::NS_uri2phpackage{$OPTION{namespace_uri}} = __PACKAGE__; |
$Message::Header::NS_uri2phpackage{$OPTION{namespace_uri}} = __PACKAGE__; |
189 |
|
|
190 |
package Message::Header::HTTP::C; |
#package Message::Header::HTTP::C; |
191 |
our %OPTION = %Message::Header::HTTP::OPTION; |
#our %OPTION = %Message::Header::HTTP::OPTION; |
192 |
$OPTION{namespace_uri} = 'urn:x-suika-fam-cx:msgpm:header:http:c'; |
#$OPTION{namespace_uri} = 'urn:x-suika-fam-cx:msgpm:header:http:c'; |
193 |
$OPTION{namespace_phname} = 'x-http-c'; |
#$OPTION{namespace_phname} = 'x-http-c'; |
194 |
$OPTION{namespace_phname_goodcase} = 'X-HTTP-C'; |
#$OPTION{namespace_phname_goodcase} = 'X-HTTP-C'; |
195 |
|
# |
196 |
$Message::Header::NS_phname2uri{$OPTION{namespace_phname}} = $OPTION{namespace_uri}; |
#$Message::Header::NS_phname2uri{$OPTION{namespace_phname}} = $OPTION{namespace_uri}; |
197 |
$Message::Header::NS_uri2phpackage{$OPTION{namespace_uri}} = __PACKAGE__; |
#$Message::Header::NS_uri2phpackage{$OPTION{namespace_uri}} = __PACKAGE__; |
198 |
|
|
199 |
package Message::Header::HTTP::CCPP; |
package Message::Header::HTTP::CCPP; |
200 |
## CC/PP exchange protocol <http://www.w3.org/TR/NOTE-CCPPexchange> |
## CC/PP exchange protocol <http://www.w3.org/TR/NOTE-CCPPexchange> |