Changeset 706

Show
Ignore:
Timestamp:
05/11/06 15:31:47
Author:
miyagawa
Message:

fixed typo

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/feature-server/plagger/lib/Plagger/Plugin/Server/Protocol/HTTP.pm

    r702 r706  
    77 
    88use base qw( Plagger::Plugin::Server::Protocol ); 
    9 __PACKAGE__->mk_accessors( qw(uri cgi headders_in headders_out content_type) ); 
     9__PACKAGE__->mk_accessors( qw(uri cgi headers_in headers_out content_type) ); 
    1010 
    1111sub proto { 'tcp' } 
     
    1919    $self->uri(''); 
    2020    $self->cgi(''); 
    21     $self->headders_in({}); 
    22     $self->headders_out({}); 
     21    $self->headers_in({}); 
     22    $self->headers_out({}); 
    2323    $self->content_type(''); 
    2424} 
    2525 
    26 sub add_headders_out { 
    27     my($self, @headder) = @_; 
     26sub add_headers_out { 
     27    my($self, @header) = @_; 
    2828 
    29     while (my($name, $value) = splice @headder, 0, 2) { 
    30         $self->{headders_out}->{$name} = $value; 
     29    while (my($name, $value) = splice @header, 0, 2) { 
     30        $self->{headers_out}->{$name} = $value; 
    3131    } 
    3232} 
     
    4646 
    4747    while (<STDIN> =~ /^([^:]+): (.+)\r\n/) { 
    48         $self->{headders_in}->{$1} = $2; 
     48        $self->{headers_in}->{$1} = $2; 
    4949    } 
    5050    if ($method eq 'POST') { 
    51         read(STDIN, my $data, $self->headders_in->{'Content-Length'} || 0); 
     51        read(STDIN, my $data, $self->headers_in->{'Content-Length'} || 0); 
    5252        $query .= "?$data"; 
    5353    } 
    5454 
    55     my $host = $self->headders_in->{Host} ||= sprintf("%s:%s", $self->conf->{host}, $self->conf->{port}); 
     55    my $host = $self->headers_in->{Host} ||= sprintf("%s:%s", $self->conf->{host}, $self->conf->{port}); 
    5656    $self->uri(URI->new("http://$host$query")); 
    5757    $self->cgi(CGI->new($self->uri->query)); 
     
    6464    my $self = shift; 
    6565 
    66     my $other_headders; 
    67     foreach my $name (%{ $self->headders_out }) { 
    68         $other_headders .= sprintf("%s: %s\r\n", $name, $self->headders_out->{$name}); 
     66    my $other_headers; 
     67    foreach my $name (%{ $self->headers_out }) { 
     68        $other_headers .= sprintf("%s: %s\r\n", $name, $self->headers_out->{$name}); 
    6969        $self->status(302) if $name eq 'Location'; 
    7070    } 
     
    8888    printf("Content-Type: %s\r\n", $self->content_type || 'text/html');  
    8989    printf("Content-Length: %d\r\n", length($body)); 
    90     print $other_headders; 
     90    print $other_headers; 
    9191    print "\r\n"; 
    9292    print $body; 
  • branches/feature-server/plagger/lib/Plagger/Plugin/Server/Pull/SimpleBbs.pm

    r702 r706  
    4646 
    4747    my $u = $args->{req}->protocol->uri; 
    48     $args->{req}->protocol->add_headders_out(Location => sprintf("%s://%s:%s%s", $u->scheme, $u->host, $u->port, $u->path)); 
     48    $args->{req}->protocol->add_headers_out(Location => sprintf("%s://%s:%s%s", $u->scheme, $u->host, $u->port, $u->path)); 
    4949} 
    5050