Skip to content

Commit

Permalink
add copyright notices throughout
Browse files Browse the repository at this point in the history
git-svn-id: http://code.sixapart.com/svn/perlbal/trunk@345 6caf28e9-730f-0410-b62b-a31386fe13fb
  • Loading branch information
bradfitz committed Jul 26, 2005
1 parent 39cf493 commit 857ebfe
Show file tree
Hide file tree
Showing 15 changed files with 77 additions and 23 deletions.
20 changes: 20 additions & 0 deletions lib/Perlbal.pm
@@ -1,5 +1,25 @@
#!/usr/bin/perl #!/usr/bin/perl
# #
# Copyright 2004, Danga Interactice, Inc.
# Copyright 2005, Six Apart, Ltd.
#

=head1 NAME
Perlbal - Reverse-proxy load balancer and webserver
=head1 SEE ALSO
http://www.danga.com/perlbal/
=head1 COPYRIGHT AND LICENSE
Copyright 2004, Danga Interactice, Inc.
Copyright 2005, Six Apart, Ltd.
You can use and redistribute Perlbal under the same terms as Perl itself.
=cut


package Perlbal; package Perlbal;


Expand Down
5 changes: 5 additions & 0 deletions lib/Perlbal/AIO.pm
@@ -1,3 +1,8 @@
# AIO abstraction layer
#
# Copyright 2004, Danga Interactice, Inc.
# Copyright 2005, Six Apart, Ltd.

package Perlbal::AIO; package Perlbal::AIO;
use POSIX qw(); use POSIX qw();


Expand Down
8 changes: 5 additions & 3 deletions lib/Perlbal/BackendHTTP.pm
@@ -1,7 +1,9 @@
###################################################################### ######################################################################
# HTTP connection to backend node # HTTP connection to backend node
# possible states: connecting, bored, sending_req, wait_res, xfer_res #
###################################################################### # Copyright 2004, Danga Interactice, Inc.
# Copyright 2005, Six Apart, Ltd.
#


package Perlbal::BackendHTTP; package Perlbal::BackendHTTP;
use strict; use strict;
Expand Down Expand Up @@ -101,7 +103,7 @@ sub new {
$self->{read_ahead} = 0; # bytes sitting in read_buf $self->{read_ahead} = 0; # bytes sitting in read_buf
$self->{read_size} = 0; # total bytes read from client $self->{read_size} = 0; # total bytes read from client


$self->{client} = undef; # Perlbal::ClientProxy object, initially empty $self->{client} = undef; # Perlbal::ClientProxy object, initially empty
# until we ask our service for one # until we ask our service for one


$self->{has_attention} = 0; $self->{has_attention} = 0;
Expand Down
5 changes: 4 additions & 1 deletion lib/Perlbal/ClientHTTP.pm
@@ -1,7 +1,10 @@
###################################################################### ######################################################################
# HTTP Connection from a reverse proxy client. GET/HEAD only. # HTTP Connection from a reverse proxy client. GET/HEAD only.
# most functionality is implemented in the base class. # most functionality is implemented in the base class.
###################################################################### #
# Copyright 2004, Danga Interactice, Inc.
# Copyright 2005, Six Apart, Ltd.
#


package Perlbal::ClientHTTP; package Perlbal::ClientHTTP;
use strict; use strict;
Expand Down
4 changes: 3 additions & 1 deletion lib/Perlbal/ClientHTTPBase.pm
Expand Up @@ -6,7 +6,9 @@
# wait_stat, wait_open, xfer_disk # wait_stat, wait_open, xfer_disk
# both paths can then go into persist_wait, which means they're waiting # both paths can then go into persist_wait, which means they're waiting
# for another request from the user # for another request from the user
###################################################################### #
# Copyright 2004, Danga Interactice, Inc.
# Copyright 2005, Six Apart, Ltd.


package main; package main;


Expand Down
6 changes: 4 additions & 2 deletions lib/Perlbal/ClientProxy.pm
@@ -1,7 +1,9 @@
###################################################################### ######################################################################
# HTTP Connection from a reverse proxy client # HTTP Connection from a reverse proxy client
###################################################################### #

# Copyright 2004, Danga Interactice, Inc.
# Copyright 2005, Six Apart, Ltd.
#
package Perlbal::ClientProxy; package Perlbal::ClientProxy;
use strict; use strict;
use warnings; use warnings;
Expand Down
3 changes: 3 additions & 0 deletions lib/Perlbal/CommandContext.pm
@@ -1,5 +1,8 @@
# keep track of the surrounding context for a ManageCommand, so commands # keep track of the surrounding context for a ManageCommand, so commands
# can be less verbose when in config files # can be less verbose when in config files
#
# Copyright 2005, Six Apart, Ltd.
#


package Perlbal::CommandContext; package Perlbal::CommandContext;
use strict; use strict;
Expand Down
7 changes: 5 additions & 2 deletions lib/Perlbal/HTTPHeaders.pm
@@ -1,6 +1,9 @@
###################################################################### ######################################################################
# HTTP header class (both request and response) # HTTP header class (both request and response)
###################################################################### #
# Copyright 2004, Danga Interactice, Inc.
# Copyright 2005, Six Apart, Ltd.
#


package Perlbal::HTTPHeaders; package Perlbal::HTTPHeaders;
use strict; use strict;
Expand Down Expand Up @@ -294,7 +297,7 @@ sub content_length {
# no content length for head requests # no content length for head requests
return 0 if $self->{method} eq 'HEAD'; return 0 if $self->{method} eq 'HEAD';
} elsif ($self->{type} eq 'res' || $self->{type} eq 'httpres') { } elsif ($self->{type} eq 'res' || $self->{type} eq 'httpres') {
# no content length in any of these # no content length in any of these
if ($self->{code} == 304 || $self->{code} == 204 || if ($self->{code} == 304 || $self->{code} == 204 ||
($self->{code} >= 100 && $self->{code} <= 199)) { ($self->{code} >= 100 && $self->{code} <= 199)) {
return 0; return 0;
Expand Down
3 changes: 3 additions & 0 deletions lib/Perlbal/ManageCommand.pm
@@ -1,5 +1,8 @@
# class representing a one-liner management command. all the responses # class representing a one-liner management command. all the responses
# to a command should be done through this instance (out, err, ok, etc) # to a command should be done through this instance (out, err, ok, etc)
#
# Copyright 2005, Six Apart, Ltd.
#


package Perlbal::ManageCommand; package Perlbal::ManageCommand;
use strict; use strict;
Expand Down
4 changes: 4 additions & 0 deletions lib/Perlbal/Pool.pm
@@ -1,6 +1,10 @@
###################################################################### ######################################################################
# Pool class # Pool class
###################################################################### ######################################################################
#
# Copyright 2004, Danga Interactice, Inc.
# Copyright 2005, Six Apart, Ltd.
#


package Perlbal::Pool; package Perlbal::Pool;
use strict; use strict;
Expand Down
9 changes: 5 additions & 4 deletions lib/Perlbal/ReproxyManager.pm
@@ -1,7 +1,8 @@
###################################################################### # HTTP connection to non-pool backend nodes (probably fast event-based webservers)
# HTTP connection to backend node #
# possible states: connecting, bored, sending_req, wait_res, xfer_res # Copyright 2004, Danga Interactice, Inc.
###################################################################### # Copyright 2005, Six Apart, Ltd.
#


package Perlbal::ReproxyManager; package Perlbal::ReproxyManager;
use strict; use strict;
Expand Down
4 changes: 4 additions & 0 deletions lib/Perlbal/Service.pm
@@ -1,6 +1,10 @@
###################################################################### ######################################################################
# Service class # Service class
###################################################################### ######################################################################
#
# Copyright 2004, Danga Interactice, Inc.
# Copyright 2005, Six Apart, Ltd.
#


package Perlbal::Service; package Perlbal::Service;
use strict; use strict;
Expand Down
9 changes: 5 additions & 4 deletions lib/Perlbal/Socket.pm
@@ -1,6 +1,7 @@
######################################################################
# Base class for all socket types # Base class for all socket types
###################################################################### #
# Copyright 2004, Danga Interactice, Inc.
# Copyright 2005, Six Apart, Ltd.


package Perlbal::Socket; package Perlbal::Socket;
use strict; use strict;
Expand Down Expand Up @@ -110,7 +111,7 @@ sub new {
# algorithmically. and this is definitely less work, so it's worth # algorithmically. and this is definitely less work, so it's worth
# a try. # a try.
sub _do_cleanup { sub _do_cleanup {
my $sf = Perlbal::Socket->get_sock_ref; my $sf = Perlbal::Socket->get_sock_ref;


my $now = time; my $now = time;


Expand Down Expand Up @@ -208,7 +209,7 @@ sub read_headers {
print "post-header extra: $len bytes\n" if Perlbal::DEBUG >= 2; print "post-header extra: $len bytes\n" if Perlbal::DEBUG >= 2;
} }


unless (($is_res ? $self->{res_headers} : $self->{req_headers}) = unless (($is_res ? $self->{res_headers} : $self->{req_headers}) =
Perlbal::HTTPHeaders->new(\$hstr, $is_res)) { Perlbal::HTTPHeaders->new(\$hstr, $is_res)) {
# bogus headers? close connection. # bogus headers? close connection.
return $self->close("parse_header_failure"); return $self->close("parse_header_failure");
Expand Down
5 changes: 4 additions & 1 deletion lib/Perlbal/TCPListener.pm
@@ -1,6 +1,9 @@
###################################################################### ######################################################################
# TCP listener on a given port # TCP listener on a given port
###################################################################### #
# Copyright 2004, Danga Interactice, Inc.
# Copyright 2005, Six Apart, Ltd.



package Perlbal::TCPListener; package Perlbal::TCPListener;
use strict; use strict;
Expand Down
8 changes: 3 additions & 5 deletions perlbal
Expand Up @@ -18,13 +18,11 @@ For now, see example configuration files in conf/
http://www.danga.com/perlbal/ http://www.danga.com/perlbal/
=head1 BUGS =head1 COPYRIGHT AND LICENSE
Not enough docs. Copyright 2004, Danga Interactice, Inc.
Copyright 2005, Six Apart, Ltd.
=head1 LICENSE
Copyright 2004.
You can use and redistribute Perlbal under the same terms as Perl itself. You can use and redistribute Perlbal under the same terms as Perl itself.
=cut =cut
Expand Down

0 comments on commit 857ebfe

Please sign in to comment.