<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -29,8 +29,8 @@
     &lt;link rel=&quot;stylesheet&quot; href=&quot;styles.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
     &lt;link rel=&quot;stylesheet&quot; href=&quot;themes/common/print.css&quot; type=&quot;text/css&quot; media=&quot;print&quot; /&gt;
 
-    &lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;Posts on '[% blog_name | html %]' (RSS 2.0)&quot; href=&quot;http://[% resty_server %]/=/feed/Post/count/100?user=[% blog_owner %].Public&quot; /&gt;
-    &lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;Comments on '[% blog_name | html %]' (RSS 2.0)&quot; href=&quot;http://[% resty_server %]/=/feed/Comment/count/100?user=[% blog_owner %].Public&quot; /&gt;
+    &lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;Posts on '[% blog_name | html %]' (RSS 2.0)&quot; href=&quot;http://[% resty_server %]/=/feed/Post/_user/[% blog_owner %].Public&quot; /&gt;
+    &lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;Comments on '[% blog_name | html %]' (RSS 2.0)&quot; href=&quot;http://[% resty_server %]/=/feed/Comment/_user/[% blog_owner %].Public&quot; /&gt;
 
 &lt;/head&gt;
 </diff>
      <filename>demo/Blog/template/header.tt</filename>
    </modified>
    <modified>
      <diff>@@ -3,6 +3,7 @@ define CMDS
     -perl -Iblib -c bin/openresty
     -sudo killall lighttpd
     sudo /etc/init.d/lighttpd restart
+    sudo /opt/eeeeresty/apache/bin/apachectl restart
     sleep 1
     -sudo find lib -name '*.pmc' -delete
     -sudo rm -rf /tmp/FileCache
@@ -34,6 +35,7 @@ debug: all
 %.t: all force
 	perl -c bin/openresty
 	sudo /etc/init.d/lighttpd restart
+	sudo /opt/eeeeresty/apache/bin/apachectl restart
 	-sudo rm -rf /tmp/FileCache
 	-rm  -f t/cur-timer.dat
 	-prove -Ilib $@</diff>
      <filename>dev.mk</filename>
    </modified>
    <modified>
      <diff>@@ -358,13 +358,20 @@ sub response {
         index($ENV{HTTP_ACCEPT_ENCODING} || '', 'gzip') &gt;= 0;
     #warn &quot;use gzip: $use_gzip\n&quot;;
     my $http_status = $self-&gt;{_http_status};
-    print &quot;$http_status\n&quot;;
+    if ($OpenResty::Server::IsRunning) {
+        print &quot;$http_status\r\n&quot;;
+    } else {
+        $http_status =~ s{^\s*HTTP/\d+\.\d+\s*}{};
+        #warn &quot;http_status: $http_status\n&quot;;
+        binmode \*STDOUT;
+        print &quot;Status: $http_status\r\n&quot;;
+    }
+    #print &quot;$http_status\r\n&quot;;
     # warn &quot;$http_status&quot;;
     my $type = $self-&gt;{_type} || 'text/plain';
     #warn $s;
     my $str = '';
     if (my $bin_data = $self-&gt;{_bin_data}) {
-        binmode \*STDOUT;
         local $_;
         if (my $callback = $self-&gt;{_callback}) {
             chomp($bin_data);</diff>
      <filename>lib/OpenResty.pm</filename>
    </modified>
    <modified>
      <diff>@@ -4,8 +4,11 @@ use strict;
 use warnings;
 use base qw(HTTP::Server::Simple::CGI);
 
+our $IsRunning = 0;
+
 sub handle_request {
     my ($self, $cgi) = @_;
+    $IsRunning = 1;
     OpenResty::Dispatcher-&gt;process_request($cgi);
 }
 </diff>
      <filename>lib/OpenResty/Server.pm</filename>
    </modified>
    <modified>
      <diff>@@ -143,8 +143,11 @@ sub _request {
     if (is_utf8($Buffer)) {
         $Buffer = encode('utf8', $Buffer);
     }
-    if ($Buffer =~ /^HTTP\/1\.[01] (\d+) (\w+)\n/) {
+    if ($Buffer =~ /^HTTP\/1\.[01] (\d+) (\w+)\r?\n/) {
         $code = $1;
+    } else {
+        $Buffer = &quot;HTTP/1.1 200 OK\r\n$Buffer&quot;;
+        $code = 200;
     }
     my $res = HTTP::Response-&gt;parse($Buffer); # $code, $msg, $header, $content )
     ## $res</diff>
      <filename>lib/WWW/OpenResty/Embedded.pm</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@ if ($backend-&gt;has_user(&quot;agentz&quot;)) {
 }
 
 my $res = $backend-&gt;add_user(&quot;agentz&quot;, 'blahblahblah');
-cmp_ok $res, '&gt;', -1, &quot;user added okay&quot;;
+ok $res, &quot;user added okay&quot;;
 
 $backend-&gt;set_user(&quot;agentz&quot;);
 </diff>
      <filename>t/pg/sanity.t</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6d3de249bc430995be4e8ddf6250761eb96c3ba7</id>
    </parent>
  </parents>
  <author>
    <name>agentzh</name>
    <email>agentzh@gmail.com</email>
  </author>
  <url>http://github.com/agentzh/openresty/commit/884cbddb31e5fdbf57ff8750bee1a2c2266d9886</url>
  <id>884cbddb31e5fdbf57ff8750bee1a2c2266d9886</id>
  <committed-date>2009-05-01T04:26:52-07:00</committed-date>
  <authored-date>2009-05-01T04:26:52-07:00</authored-date>
  <message>now we honor the FastCGI protocol and send the Status header to the fastcgi manager</message>
  <tree>be5cef247ae463e747d23f65e7daca271c609336</tree>
  <committer>
    <name>agentzh</name>
    <email>agentzh@gmail.com</email>
  </committer>
</commit>
