/[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.1 - (hide annotations) (download)
Sat Jul 6 10:29:31 2002 UTC (22 years, 4 months ago) by wakaba
Branch: MAIN
2002-07-06  Wakaba <w@suika.fam.cx>

	* HTTP.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     $VERSION=do{my @r=(q$Revision: 1.6 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};
14    
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     =head1 LICENSE
78    
79     Copyright 2002 wakaba E<lt>w@suika.fam.cxE<gt>.
80    
81     This program is free software; you can redistribute it and/or modify
82     it under the terms of the GNU General Public License as published by
83     the Free Software Foundation; either version 2 of the License, or
84     (at your option) any later version.
85    
86     This program is distributed in the hope that it will be useful,
87     but WITHOUT ANY WARRANTY; without even the implied warranty of
88     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
89     GNU General Public License for more details.
90    
91     You should have received a copy of the GNU General Public License
92     along with this program; see the file COPYING. If not, write to
93     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
94     Boston, MA 02111-1307, USA.
95    
96     =head1 CHANGE
97    
98     See F<ChangeLog>.
99     $Date: 2002/07/04 06:38:21 $
100    
101     =cut
102    
103     1;

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24