diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2013-07-23 17:02:16 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2013-07-23 17:02:16 +0200 |
commit | d457abd70ac0332d1226e393578c942f4a48cb0a (patch) | |
tree | 754eb4301741d4ed68c5146e41dd4eaf9948fba8 /Bugzilla | |
parent | fac13963f90de2ec70b6ef86e6820b2c4b989eee (diff) | |
parent | 225d5430bc810f005c993d9f5234ffc47c4429c2 (diff) | |
download | bugzilla-d457abd70ac0332d1226e393578c942f4a48cb0a.tar.gz bugzilla-d457abd70ac0332d1226e393578c942f4a48cb0a.tar.xz |
merged with bugzilla/4.2
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/WebService/Server/XMLRPC.pm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Bugzilla/WebService/Server/XMLRPC.pm b/Bugzilla/WebService/Server/XMLRPC.pm index 824f6ee2d..1c8df1495 100644 --- a/Bugzilla/WebService/Server/XMLRPC.pm +++ b/Bugzilla/WebService/Server/XMLRPC.pm @@ -68,8 +68,16 @@ sub make_response { # XMLRPC::Transport::HTTP::CGI doesn't know about Bugzilla carrying around # its cookies in Bugzilla::CGI, so we need to copy them over. - foreach (@{Bugzilla->cgi->{'Bugzilla_cookie_list'}}) { - $self->response->headers->push_header('Set-Cookie', $_); + foreach my $cookie (@{Bugzilla->cgi->{'Bugzilla_cookie_list'}}) { + $self->response->headers->push_header('Set-Cookie', $cookie); + } + + # Copy across security related headers from Bugzilla::CGI + foreach my $header (split(/[\r\n]+/, Bugzilla->cgi->header)) { + my ($name, $value) = $header =~ /^([^:]+): (.*)/; + if (!$self->response->headers->header($name)) { + $self->response->headers->header($name => $value); + } } } |