[interchange] * Extra headers should always be sent, even for a redirect. (Our redirects were
Mike Heins
interchange-cvs at icdevgroup.org
Thu Mar 17 17:30:19 UTC 2016
commit 6b511632d93ef423d66d71fbbd0d787ba2e5306b
Author: Mike Heins <mike at perusion.com>
Date: Thu Mar 17 13:28:36 2016 -0400
* Extra headers should always be sent, even for a redirect. (Our redirects were
always cacheable unless explicitly set prior to deliver call.)
code/SystemTag/deliver.coretag | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/code/SystemTag/deliver.coretag b/code/SystemTag/deliver.coretag
index d6e221b..3a53955 100644
--- a/code/SystemTag/deliver.coretag
+++ b/code/SystemTag/deliver.coretag
@@ -40,6 +40,17 @@ sub {
$out = \$body;
}
+ if($opt->{extra_headers}) {
+ my @lines = grep /\S/, split /[\r\n]+/, $opt->{extra_headers};
+ for(@lines) {
+ my ($header, $val) = split /:/, $_;
+ $Tag->tag( { op => 'header',
+ name => $header,
+ content => $val,
+ } );
+ }
+ }
+
## This is a bounce, returns
if($opt->{location}) {
$type = Vend::Util::header_data_scrub($type);
@@ -83,16 +94,6 @@ sub {
$$out =~ s/(---+END PGP MESSAGE---+).*/$1\n/s;
}
- if($opt->{extra_headers}) {
- my @lines = grep /\S/, split /[\r\n]+/, $opt->{extra_headers};
- for(@lines) {
- my ($header, $val) = split /:/, $_;
- $Tag->tag( { op => 'header',
- name => $header,
- content => $val,
- } );
- }
- }
$::Pragma->{download} = 1;
::response($out);
$Vend::Sent = 1;
More information about the interchange-cvs
mailing list