]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1269252 - Using callback parameter with REST API causes read-only accessor error...
authorDavid Lawrence <dkl@mozilla.com>
Mon, 2 May 2016 13:43:37 +0000 (13:43 +0000)
committerDylan William Hardison <dylan@hardison.net>
Wed, 4 May 2016 18:32:31 +0000 (14:32 -0400)
r=dylan

Bugzilla/API/Server.pm

index e3bf1ea71c7e852d29b19aade62099000678f5c8..a423f2f424304eb16ec51c662ffe21ef0e67bc7f 100644 (file)
@@ -41,7 +41,7 @@ has api_options     => (is => 'rw', default => sub { [] });
 has api_params      => (is => 'rw', default => sub { {} });
 has api_path        => (is => 'rw', default => '');
 has cgi             => (is => 'lazy');
-has content_type    => (is => 'lazy');
+has content_type    => (is => 'rw', default => 'application/json');
 has controller      => (is => 'rw', default => undef);
 has json            => (is => 'lazy');
 has load_error      => (is => 'rw', default => undef);
@@ -222,10 +222,6 @@ sub _build_cgi {
     return Bugzilla->cgi;
 }
 
-sub _build_content_type {
-    return 'application/json';
-}
-
 sub _build_json {
     # This may seem a little backwards to set utf8(0), but what this really
     # means is "don't convert our utf8 into byte strings, just leave it as a