/[suikacvs]/messaging/manakai/lib/Message/Header/HTTP.pm
Suika

Contents of /messaging/manakai/lib/Message/Header/HTTP.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Mon Jul 8 11:47:20 2002 UTC (22 years, 4 months ago) by wakaba
Branch: MAIN
Changes since 1.2: +5 -2 lines
2002-07-08  Wakaba <w@suika.fam.cx>

	* Message.pm: New module.

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.3 $VERSION=do{my @r=(q$Revision: 1.2 $=~/\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 wakaba 1.3
82     $OPTION{use_ph_namespace} = 0;
83 wakaba 1.2 $OPTION{namespace_phname} = '';
84     $OPTION{namespace_phname_goodcase} = '';
85 wakaba 1.3
86 wakaba 1.2 $OPTION{value_type} = {
87     ':default' => ['Message::Field::Unstructured'],
88     ## *-Profile-Diff-(1*DIGIT): field (field-body = application/XML)
89     profile => ['Message::Field::CSV'],
90     'profile-warning' => ['Message::Field::CSV',{
91     -is_quoted_string => 0,
92     }],
93     };
94    
95     $Message::Header::NS_uri2package{ $OPTION{namespace_uri} } = __PACKAGE__;
96    
97 wakaba 1.1 =head1 LICENSE
98    
99     Copyright 2002 wakaba E<lt>w@suika.fam.cxE<gt>.
100    
101     This program is free software; you can redistribute it and/or modify
102     it under the terms of the GNU General Public License as published by
103     the Free Software Foundation; either version 2 of the License, or
104     (at your option) any later version.
105    
106     This program is distributed in the hope that it will be useful,
107     but WITHOUT ANY WARRANTY; without even the implied warranty of
108     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
109     GNU General Public License for more details.
110    
111     You should have received a copy of the GNU General Public License
112     along with this program; see the file COPYING. If not, write to
113     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
114     Boston, MA 02111-1307, USA.
115    
116     =head1 CHANGE
117    
118     See F<ChangeLog>.
119 wakaba 1.3 $Date: 2002/07/06 11:36:39 $
120 wakaba 1.1
121     =cut
122    
123     1;

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24