
interchange-cvs at icdevgroup
Aug 15, 2009, 4:53 AM
Post #1 of 1
(279 views)
Permalink
|
|
[SCM] Interchange branch, master, updated. dcf46bf20ef36ae7c3152215285ef4eb10209c2f
|
|
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, master has been updated via dcf46bf20ef36ae7c3152215285ef4eb10209c2f (commit) via 26ea027d97df622eb66f59db83e37f569a61f73a (commit) via ea7a7ee711cf30a45fadf1134284950f203e6f77 (commit) via 701bfebf9336f89675488d0ad4bae15f13c953dc (commit) from 00161cc0d050620431dd26379fb11b37098c59bc (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 dcf46bf20ef36ae7c3152215285ef4eb10209c2f Author: Peter Ajamian <peter [at] pajamian> Date: Sat Aug 15 04:44:20 2009 -0700 Update WHATSNEW-5.7 file for recent fix to compile_link. Update WHATSNEW-5.7 file for recent fix to compile_link. commit 26ea027d97df622eb66f59db83e37f569a61f73a Author: Peter Ajamian <peter [at] pajamian> Date: Sat Aug 15 04:32:02 2009 -0700 Don't ignore case of passed options to compile_link. compile_link was confusing the -s socketfile option with the new -S status because Getopt::Long ignores option case by default. This fixes the problem by passing the no_ignore_case config parameter to Getopt::Long. commit ea7a7ee711cf30a45fadf1134284950f203e6f77 Merge: 701bfebf9336f89675488d0ad4bae15f13c953dc 00161cc0d050620431dd26379fb11b37098c59bc Author: Peter Ajamian <peter [at] pajamian> Date: Sat Aug 15 04:23:43 2009 -0700 Merge branch 'master' of git://github.com/interchange/interchange commit 701bfebf9336f89675488d0ad4bae15f13c953dc Author: Peter Ajamian <peter [at] pajamian> Date: Mon Jul 20 04:38:52 2009 -0700 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> for pointing out the regression caused by this. ----------------------------------------------------------------------- Summary of changes and diff: WHATSNEW-5.7 | 10 +++++++++- lib/Vend/Server.pm | 14 +++++++++++--- scripts/compile_link.PL | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/WHATSNEW-5.7 b/WHATSNEW-5.7 index 0f293a6..c05603b 100644 --- a/WHATSNEW-5.7 +++ b/WHATSNEW-5.7 @@ -119,6 +119,14 @@ Core * Update broken getppid() detection for Perl 5.10.0. +* Do not specify a default charset if none is passed via MV_HTTP_CHARSET. + Thanks to Raymond Cheng <rayonnet [at] hotmail> for pointing out the regression + caused by this. + +* compile_link was confusing the -s socketfile option with the new -S status + because Getopt::Long ignores option case by default. This fixes the problem + by passing the no_ignore_case config parameter to Getopt::Long. + Payment ------- @@ -359,7 +367,7 @@ UserTag * We are vulnerable to cross-site scripting problems any time there is a <input value="[value foo]"> call. You can get around this, of course, - with <input value="[value name=foo keep=1 filter=encode_entities"]"> + with <input value="[value name=foo keep=1 filter=encode_entities]"> instead. That is a bit of a mess, though, so I added an alias for that called "evalue". diff --git a/lib/Vend/Server.pm b/lib/Vend/Server.pm index 60fb7e6..3c59e2f 100644 --- a/lib/Vend/Server.pm +++ b/lib/Vend/Server.pm @@ -558,7 +558,7 @@ sub respond { # Safe kludge: duplicate Vend::CharSet::default_charset method here # so that $Document->send() will work from within Safe my $c = $Global::Selector{$CGI::script_name}; - my $response_charset = $c->{Variable}{MV_HTTP_CHARSET} || $Global::Variable->{MV_HTTP_CHARSET} || 'iso-8859-1'; + my $response_charset = $c->{Variable}{MV_HTTP_CHARSET} || $Global::Variable->{MV_HTTP_CHARSET}; my $status; return if $Vend::Sent; @@ -591,8 +591,16 @@ sub respond { binmode(MESSAGE, ':utf8') if ($response_charset =~ /^utf-?8$/i and $Vend::StatusLine =~ /^Content-Type: text\//); 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" diff --git a/scripts/compile_link.PL b/scripts/compile_link.PL index 4aabd73..58c9185 100644 --- a/scripts/compile_link.PL +++ b/scripts/compile_link.PL @@ -35,7 +35,7 @@ use Getopt::Long; use vars qw/$Self/; -Getopt::Long::config(qw/permute/); +Getopt::Long::config(qw/permute no_ignore_case/); BEGIN { $::Self = { hooks/post-receive -- Interchange _______________________________________________ interchange-cvs mailing list interchange-cvs [at] icdevgroup http://www.icdevgroup.org/mailman/listinfo/interchange-cvs
|