Commit f7de8960 authored by Pat Thoyts's avatar Pat Thoyts Committed by Frédéric Buclin

Bug 708252: The XMLRPC API doesn't work with IIS

r=LpSolit a=dkl
parent 55e005ae
...@@ -63,6 +63,12 @@ sub make_response { ...@@ -63,6 +63,12 @@ sub make_response {
my $self = shift; my $self = shift;
my $cgi = Bugzilla->cgi; 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(@_); $self->SUPER::make_response(@_);
# XMLRPC::Transport::HTTP::CGI doesn't know about Bugzilla carrying around # XMLRPC::Transport::HTTP::CGI doesn't know about Bugzilla carrying around
...@@ -107,6 +113,8 @@ sub handle_login { ...@@ -107,6 +113,8 @@ sub handle_login {
if (none { $_ eq $method } $class->PUBLIC_METHODS) { if (none { $_ eq $method } $class->PUBLIC_METHODS) {
ThrowCodeError('unknown_method', { method => $full_method }); ThrowCodeError('unknown_method', { method => $full_method });
} }
$ENV{CONTENT_LENGTH} = 0 if $ENV{'SERVER_SOFTWARE'} =~ /IIS/;
$self->SUPER::handle_login($class, $method, $full_method); $self->SUPER::handle_login($class, $method, $full_method);
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment