HTTPの改行について

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Define the CRLF sequence.  You can't use a simple "\r\n" because of system
# specific 'features'. On EBCDIC systems "\t" ne "\011" as the don't use ASCII
sub crlf {
my ( $self, $CRLF ) = @_;
$self->{'.crlf'} = $CRLF if $CRLF;    # allow value to be set manually
unless ( $self->{'.crlf'} ) {
my $OS = $^O
|| do { require Config; $Config::Config{'osname'} };
$self->{'.crlf'}
= ( $OS =~ m/VMS/i ) ? "\n"
: ( "\t" ne "\011" ) ? "\r\n"
:                      "\015\012";
}
return $self->{'.crlf'};
}
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy