1 |
wakaba |
1.1 |
|
2 |
|
|
=head1 NAME |
3 |
|
|
|
4 |
|
|
Message::Header::RFC822 --- Internet Messages -- Definition |
5 |
|
|
for RFC822 Namespaces of Header Fields |
6 |
|
|
|
7 |
|
|
=cut |
8 |
|
|
|
9 |
|
|
require Message::Header::Default; |
10 |
|
|
package Message::Header::HTTP; |
11 |
|
|
use strict; |
12 |
|
|
use vars qw($VERSION); |
13 |
wakaba |
1.2 |
$VERSION=do{my @r=(q$Revision: 1.1 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; |
14 |
wakaba |
1.1 |
|
15 |
|
|
our %OPTION = %Message::Header::Default::OPTION; |
16 |
|
|
$OPTION{namespace_uri} = 'urn:x-suika-fam-cx:msgpm:header:http'; |
17 |
|
|
$OPTION{namespace_phname} = 'x-http'; |
18 |
|
|
$OPTION{namespace_phname_goodcase} = 'X-HTTP'; |
19 |
|
|
|
20 |
|
|
$OPTION{case_sensible} = 0; |
21 |
|
|
$OPTION{to_be_goodcase} = \&Message::Header::Default::_goodcase; |
22 |
|
|
|
23 |
|
|
$OPTION{goodcase} = { |
24 |
|
|
'pics-label' => 'PICS-Label', |
25 |
|
|
'message-id' => 'Message-ID', |
26 |
|
|
'mime-version' => 'MIME-Version', |
27 |
|
|
uri => 'URI', |
28 |
|
|
}; |
29 |
|
|
|
30 |
|
|
$OPTION{value_type} = { |
31 |
|
|
':default' => ['Message::Field::Unstructured'], |
32 |
|
|
|
33 |
|
|
date => ['Message::Field::Date'], |
34 |
|
|
expires => ['Message::Field::Date'], |
35 |
|
|
'if-modified-since' => ['Message::Field::Date'], |
36 |
|
|
'last-modified' => ['Message::Field::Date'], |
37 |
|
|
|
38 |
|
|
man => ['Message::Field::CSV'], |
39 |
|
|
opt => ['Message::Field::CSV'], |
40 |
|
|
p3p => ['Message::Field::Params'], |
41 |
|
|
|
42 |
|
|
## Numeric value |
43 |
|
|
'mime-version' => ['Message::Field::Numval'], |
44 |
|
|
|
45 |
|
|
server => ['Message::Field::UA'], |
46 |
|
|
'user-agent' => ['Message::Field::UA'], |
47 |
|
|
'from' => ['Message::Field::Addresses'], |
48 |
|
|
|
49 |
|
|
link => ['Message::Field::CSV'], |
50 |
|
|
uri => ['Message::Field::CSV'], |
51 |
|
|
|
52 |
|
|
location => ['Message::Field::URI'], |
53 |
|
|
referer => ['Message::Field::URI'], |
54 |
|
|
referrer => ['Message::Field::URI'], |
55 |
|
|
}; |
56 |
|
|
|
57 |
|
|
$OPTION{uri_mailto_safe} = { |
58 |
|
|
':default' => 1, |
59 |
|
|
}; |
60 |
|
|
|
61 |
|
|
$OPTION{field}->{ext} = { ## RFC 2774 |
62 |
|
|
empty_body => 1, |
63 |
|
|
}; |
64 |
|
|
|
65 |
|
|
$Message::Header::NS_phname2uri{$OPTION{namespace_phname}} = $OPTION{namespace_uri}; |
66 |
|
|
$Message::Header::NS_uri2phpackage{$OPTION{namespace_uri}} = __PACKAGE__; |
67 |
|
|
|
68 |
|
|
package Message::Header::HTTP::C; |
69 |
|
|
our %OPTION = %Message::Header::HTTP::OPTION; |
70 |
|
|
$OPTION{namespace_uri} = 'urn:x-suika-fam-cx:msgpm:header:http:c'; |
71 |
|
|
$OPTION{namespace_phname} = 'x-http-c'; |
72 |
|
|
$OPTION{namespace_phname_goodcase} = 'X-HTTP-C'; |
73 |
|
|
|
74 |
|
|
$Message::Header::NS_phname2uri{$OPTION{namespace_phname}} = $OPTION{namespace_uri}; |
75 |
|
|
$Message::Header::NS_uri2phpackage{$OPTION{namespace_uri}} = __PACKAGE__; |
76 |
|
|
|
77 |
wakaba |
1.2 |
package Message::Header::HTTP::CCPP; |
78 |
|
|
## CC/PP exchange protocol <http://www.w3.org/TR/NOTE-CCPPexchange> |
79 |
|
|
our %OPTION = %Message::Header::HTTP::OPTION; |
80 |
|
|
$OPTION{namespace_uri} = 'http://www.w3.org/1999/06/24-CCPPexchange'; |
81 |
|
|
$OPTION{namespace_phname} = ''; |
82 |
|
|
$OPTION{namespace_phname_goodcase} = ''; |
83 |
|
|
$OPTION{value_type} = { |
84 |
|
|
':default' => ['Message::Field::Unstructured'], |
85 |
|
|
## *-Profile-Diff-(1*DIGIT): field (field-body = application/XML) |
86 |
|
|
profile => ['Message::Field::CSV'], |
87 |
|
|
'profile-warning' => ['Message::Field::CSV',{ |
88 |
|
|
-is_quoted_string => 0, |
89 |
|
|
}], |
90 |
|
|
}; |
91 |
|
|
|
92 |
|
|
$Message::Header::NS_uri2package{ $OPTION{namespace_uri} } = __PACKAGE__; |
93 |
|
|
|
94 |
wakaba |
1.1 |
=head1 LICENSE |
95 |
|
|
|
96 |
|
|
Copyright 2002 wakaba E<lt>w@suika.fam.cxE<gt>. |
97 |
|
|
|
98 |
|
|
This program is free software; you can redistribute it and/or modify |
99 |
|
|
it under the terms of the GNU General Public License as published by |
100 |
|
|
the Free Software Foundation; either version 2 of the License, or |
101 |
|
|
(at your option) any later version. |
102 |
|
|
|
103 |
|
|
This program is distributed in the hope that it will be useful, |
104 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
105 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
106 |
|
|
GNU General Public License for more details. |
107 |
|
|
|
108 |
|
|
You should have received a copy of the GNU General Public License |
109 |
|
|
along with this program; see the file COPYING. If not, write to |
110 |
|
|
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
111 |
|
|
Boston, MA 02111-1307, USA. |
112 |
|
|
|
113 |
|
|
=head1 CHANGE |
114 |
|
|
|
115 |
|
|
See F<ChangeLog>. |
116 |
wakaba |
1.2 |
$Date: 2002/07/06 10:29:31 $ |
117 |
wakaba |
1.1 |
|
118 |
|
|
=cut |
119 |
|
|
|
120 |
|
|
1; |