[interchange-cvs] [SCM] Interchange branch, STABLE_5_6-branch, updated. REL_5_6_2-2-gf8efb64

David Christensen interchange-cvs at icdevgroup.org
Fri Sep 25 02:10:49 UTC 2009


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Interchange".

The branch, STABLE_5_6-branch has been updated
       via  f8efb646ea1865834acdcb223274eeca85eaaa14 (commit)
       via  3678d6f22372120f5341f236f0d06e4a7ea25718 (commit)
      from  4334287f258c50cc482f6a5799b18b0de3b8c321 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f8efb646ea1865834acdcb223274eeca85eaaa14
Author: David Christensen <david at endpoint.com>
Date:   Thu Sep 24 20:24:03 2009 -0500

    Fix empty charset= lines the default case when no $Vend::StatusLine is previously set

commit 3678d6f22372120f5341f236f0d06e4a7ea25718
Author: David Christensen <david at endpoint.com>
Date:   Thu Sep 24 15:59:34 2009 -0500

    Do not specify a default charset if none is passed via MV_HTTP_CHARSET.
    
    Do not specify a default charset if none is passed via MV_HTTP_CHARSET.
    Thanks to Raymond Cheng <rayonnet at hotmail.com> for pointing out the regression
    caused by this.

-----------------------------------------------------------------------

Summary of changes and diff:
 lib/Vend/Server.pm |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/lib/Vend/Server.pm b/lib/Vend/Server.pm
index 9a28bb3..e0dedde 100644
--- a/lib/Vend/Server.pm
+++ b/lib/Vend/Server.pm
@@ -565,8 +565,16 @@ sub respond {
 	$Vend::StatusLine =~ s/\s*$/\r\n/ if $Vend::StatusLine;
 
 	if(! $s and $Vend::StatusLine) {
-		$Vend::StatusLine .= ($Vend::StatusLine =~ /^Content-Type:/im)
-							? '' : "\r\nContent-Type: text/html; charset=$response_charset\r\n";
+	    if ($Vend::StatusLine !~ /^Content-Type:/im) {
+		$Vend::StatusLine .= "\r\nContent-Type: text/html";
+		if ($response_charset) {
+		     $Vend::StatusLine .= "; charset=$response_charset\r\n";
+		}
+
+		else {
+		     $Vend::StatusLine .= "\r\n";
+		}
+	    }
 
 # TRACK
         $Vend::StatusLine .= "X-Track: " . $Vend::Track->header() . "\r\n"
@@ -681,7 +689,13 @@ sub respond {
 		print $fh canon_status($Vend::StatusLine);
 	}
 	elsif(! $Vend::ResponseMade) {        
-		print $fh canon_status("Content-Type: text/html; charset=$response_charset");
+		if ($response_charset) {
+            print $fh canon_status("Content-Type: text/html; charset=$response_charset");
+            
+		}
+        else {
+            print $fh canon_status("Content-Type: text/html");
+        }
 # TRACK        
         print $fh canon_status("X-Track: " . $Vend::Track->header())
 			if $Vend::Track and $Vend::Cfg->{UserTrack};


hooks/post-receive
-- 
Interchange



More information about the interchange-cvs mailing list