[Rt-commit] rt branch, 4.0/migrate-cgi-env, repushed
? sunnavy
sunnavy at bestpractical.com
Thu Oct 16 09:23:46 EDT 2014
The branch 4.0/migrate-cgi-env was deleted and repushed:
was 96fee9df1c053c544b0f4bf7db04e7fee4f4483c
now 50baf721bf95bd0a11830bd72262abeef6e250c8
1: a21a65a = 1: a21a65a abstract usage of cgi env variables
2: f2a9bb3 ! 2: ff62d45 pickuse psgi env directly
@@ -2,8 +2,15 @@
pickuse psgi env directly
- sadly that we need to keep REQUEST_METHOD and HTTP_ACCEPT_LANGUAGE to make
- i18n(actually I18N::LangTags::Detect) happy.
+ sadly we still need to keep several env vars:
+
+ * REQUEST_METHOD and HTTP_ACCEPT_LANGUAGE
+
+ they are used in I18N::LangTags::Detect
+
+ * PATH
+
+ on fastcgi mode(at least), we need this to find commands like "dot"
Fixes: #30427
@@ -49,7 +56,7 @@
- # XXX: until we get rid of all $ENV stuff.
- local %ENV = (%ENV, CGI::Emulate::PSGI->emulate_environment($env));
-
-+ local %ENV = (%ENV, map { $_ => $env->{$_} } qw/HTTP_ACCEPT_LANGUAGE REQUEST_METHOD/);
++ local %ENV = (%ENV, map { $_ => $env->{$_} } grep { exists $env->{$_} } qw/HTTP_ACCEPT_LANGUAGE REQUEST_METHOD PATH/);
$ret = $h->handle_psgi($env);
}
@@ -58,7 +65,7 @@
$ret = sub {
my $respond = shift;
- local %ENV = (%ENV, CGI::Emulate::PSGI->emulate_environment($env));
-+ local %ENV = (%ENV, map { $_ => $env->{$_} } qw/HTTP_ACCEPT_LANGUAGE REQUEST_METHOD/);
++ local %ENV = (%ENV, map { $_ => $env->{$_} } grep { exists $env->{$_} } qw/HTTP_ACCEPT_LANGUAGE REQUEST_METHOD PATH/);
$orig_ret->($respond);
};
}
3: 96fee9d = 3: 50baf72 update the mock of $m to reflect the cgi env migration
More information about the rt-commit
mailing list