aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Server/XMLRPC.pm
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2015-09-23 23:14:46 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-09-23 23:14:46 +0200
commitf7de8960ee6a79395c9318fdfb04b5c29a0835c5 (patch)
tree0b2bd18ed2dbe535172d29af059898d64ddeea47 /Bugzilla/WebService/Server/XMLRPC.pm
parent55e005aec91f95f19a08b137c16460cde55a2d0d (diff)
downloadbugs-f7de8960ee6a79395c9318fdfb04b5c29a0835c5.tar
bugs-f7de8960ee6a79395c9318fdfb04b5c29a0835c5.tar.gz
bugs-f7de8960ee6a79395c9318fdfb04b5c29a0835c5.tar.bz2
bugs-f7de8960ee6a79395c9318fdfb04b5c29a0835c5.tar.xz
bugs-f7de8960ee6a79395c9318fdfb04b5c29a0835c5.zip
Bug 708252: The XMLRPC API doesn't work with IIS
r=LpSolit a=dkl
Diffstat (limited to 'Bugzilla/WebService/Server/XMLRPC.pm')
-rw-r--r--Bugzilla/WebService/Server/XMLRPC.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Server/XMLRPC.pm b/Bugzilla/WebService/Server/XMLRPC.pm
index 98a0ee405..8deb253ad 100644
--- a/Bugzilla/WebService/Server/XMLRPC.pm
+++ b/Bugzilla/WebService/Server/XMLRPC.pm
@@ -63,6 +63,12 @@ sub make_response {
my $self = shift;
my $cgi = Bugzilla->cgi;
+ # Fix various problems with IIS.
+ if ($ENV{'SERVER_SOFTWARE'} =~ /IIS/) {
+ $ENV{CONTENT_LENGTH} = 0;
+ binmode(STDOUT, ':bytes');
+ }
+
$self->SUPER::make_response(@_);
# XMLRPC::Transport::HTTP::CGI doesn't know about Bugzilla carrying around
@@ -107,6 +113,8 @@ sub handle_login {
if (none { $_ eq $method } $class->PUBLIC_METHODS) {
ThrowCodeError('unknown_method', { method => $full_method });
}
+
+ $ENV{CONTENT_LENGTH} = 0 if $ENV{'SERVER_SOFTWARE'} =~ /IIS/;
$self->SUPER::handle_login($class, $method, $full_method);
return;
}