Permalink
Browse files

Checking in changes prior to tagging of version 1.60. Changelog diff is:

Index: CHANGES
===================================================================
--- CHANGES	(revision 715)
+++ CHANGES	(working copy)
@@ -1,3 +1,9 @@
+1.60: 2007-10-23
+
+    -- accept LFLF to end HTTP request headers, instead of just
+       CRLFCRLF.  easier monitoring with netcat & other popular
+       webservers accept LFLF anyway.  (Paul Baker)
+
     -- SHUTDOWN GRACEFUL [timeout] - now accepts optional timeout
        parameter to force shutdown after that period in seconds
 
@@ -33,7 +39,7 @@
 
     -- the buffered upload rate test should pass more reliably now.  some
        people reported it sporadically (or often) failing before
-       
+
     -- new per-service configuration value: persist_client_timeout -
        timeout in seconds for HTTP keep-alives to the end user
        (defaults to 30 seconds)


git-svn-id: http://code.sixapart.com/svn/perlbal/trunk@716 6caf28e9-730f-0410-b62b-a31386fe13fb
  • Loading branch information...
1 parent f21436f commit 1674769d1ec61c9ba9d4072a96fb7c928b895fd8 bradfitz committed Oct 24, 2007
Showing with 18 additions and 6 deletions.
  1. +7 −1 CHANGES
  2. +1 −1 META.yml
  3. +1 −1 Perlbal.spec
  4. +1 −1 lib/Perlbal.pm
  5. +8 −2 lib/Perlbal/Socket.pm
View
8 CHANGES
@@ -1,3 +1,9 @@
+1.60: 2007-10-23
+
+ -- accept LFLF to end HTTP request headers, instead of just
+ CRLFCRLF. easier monitoring with netcat & other popular
+ webservers accept LFLF anyway. (Paul Baker)
+
-- SHUTDOWN GRACEFUL [timeout] - now accepts optional timeout
parameter to force shutdown after that period in seconds
@@ -33,7 +39,7 @@
-- the buffered upload rate test should pass more reliably now. some
people reported it sporadically (or often) failing before
-
+
-- new per-service configuration value: persist_client_timeout -
timeout in seconds for HTTP keep-alives to the end user
(defaults to 30 seconds)
View
2 META.yml
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Perlbal
-version: 1.59
+version: 1.60
version_from: lib/Perlbal.pm
installdirs: site
requires:
View
2 Perlbal.spec
@@ -1,6 +1,6 @@
name: Perlbal
summary: Perlbal - High efficiency reverse proxy and web server.
-version: 1.56
+version: 1.60
release: 1
vendor: Brad Fitzpatrick <brad@danga.com>
packager: Jonathan Steinert <rpm@hachi.kuiki.net>
View
2 lib/Perlbal.pm
@@ -33,7 +33,7 @@ my $has_cycle = eval "use Devel::Cycle; 1;";
use Devel::Peek;
use vars qw($VERSION);
-$VERSION = '1.59';
+$VERSION = '1.60';
use constant DEBUG => $ENV{PERLBAL_DEBUG} || 0;
use constant DEBUG_OBJ => $ENV{PERLBAL_DEBUG_OBJ} || 0;
View
10 lib/Perlbal/Socket.pm
@@ -215,8 +215,14 @@ sub read_headers {
$self->{headers_string} .= $$bref;
my $idx = index($self->{headers_string}, "\r\n\r\n");
+ my $delim_len = 4;
- # can't find the header delimiter?
+ # can't find the header delimiter? check for LFLF header delimiter.
+ if ($idx == -1) {
+ $idx = index($self->{headers_string}, "\n\n");
+ $delim_len = 2;
+ }
+ # still can't find the header delimiter?
if ($idx == -1) {
# usually we get the headers all in one packet (one event), so
@@ -239,7 +245,7 @@ sub read_headers {
my $hstr = substr($self->{headers_string}, 0, $idx);
print " pre-parsed headers: [$hstr]\n" if Perlbal::DEBUG >= 3;
- my $extra = substr($self->{headers_string}, $idx+4);
+ my $extra = substr($self->{headers_string}, $idx+$delim_len);
if (my $len = length($extra)) {
print " pushing back $len bytes after header\n" if Perlbal::DEBUG >= 3;
$self->push_back_read(\$extra);

0 comments on commit 1674769

Please sign in to comment.