Author: sparky
Date: Wed Nov 10 15:24:08 2010
New Revision: 11902

Modified:
   toys/rsget.pl/RSGet/HTTPServer.pm
   toys/rsget.pl/data/main.js
Log:
- moved connection: close http header from client to server


Modified: toys/rsget.pl/RSGet/HTTPServer.pm
==============================================================================
--- toys/rsget.pl/RSGet/HTTPServer.pm   (original)
+++ toys/rsget.pl/RSGet/HTTPServer.pm   Wed Nov 10 15:24:08 2010
@@ -117,10 +117,14 @@
                $print .= "HTTP/1.1 401 Authorization Required\r\n";
                $print .= "WWW-Authenticate: Basic\r\n";
                $print .= "Content-Type: text/plain\r\n";
+               $print .= "Connection: close\r\n";
                $print .= "\r\nAuthorization Required\n";
        } elsif ( my $func = $RSGet::HTTPRequest::handlers{$file} ) {
                $print = "HTTP/1.1 200 OK\r\n";
-               my $headers = { Content_Type => "text/xml; charset=utf-8" };
+               my $headers = {
+                       Content_Type => "text/xml; charset=utf-8",
+                       Connection => "close"
+               };
                my $data = &$func( $file, \%post, $headers );
 
                $headers->{Content_Length} ||= length $data;
@@ -133,6 +137,7 @@
                $print .= $data;
        } else {
                $print = "HTTP/1.1 404 Not found\r\n";
+               $print .= "Connection: close\r\n";
                $print .= "\r\n";
        }
 

Modified: toys/rsget.pl/data/main.js
==============================================================================
--- toys/rsget.pl/data/main.js  (original)
+++ toys/rsget.pl/data/main.js  Wed Nov 10 15:24:08 2010
@@ -14,7 +14,6 @@
        req.open( "POST", link, true );
        req.setRequestHeader( 'Content-Type', 
'application/x-www-form-urlencoded' );
        req.setRequestHeader( 'Content-Length', post.length );
-       req.setRequestHeader( 'Connection', 'close' );
        req.send( post );
 }
 
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to