diff options
-rw-r--r-- | Bugzilla/Attachment.pm | 11 | ||||
-rw-r--r-- | Bugzilla/WebService/Bug.pm | 4 | ||||
-rw-r--r-- | Bugzilla/WebService/Constants.pm | 1 |
3 files changed, 13 insertions, 3 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 0f6bf0a74..2bd5d8f3c 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -112,6 +112,10 @@ use constant VALIDATORS => { mimetype => \&_check_content_type, }; +use constant VALIDATOR_DEPENDENCIES => { + mimetype => ['ispatch'], +}; + use constant UPDATE_VALIDATORS => { isobsolete => \&Bugzilla::Object::check_boolean, }; @@ -508,9 +512,10 @@ sub _check_bug { } sub _check_content_type { - my ($invocant, $content_type) = @_; - - $content_type = 'text/plain' if (ref $invocant && $invocant->ispatch); + my ($invocant, $content_type, undef, $params) = @_; + + my $is_patch = ref($invocant) ? $invocant->ispatch : $params->{ispatch}; + $content_type = 'text/plain' if $is_patch; $content_type = trim($content_type); my $legal_types = join('|', LEGAL_CONTENT_TYPES); if (!$content_type or $content_type !~ /^($legal_types)\/.+$/) { diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm index 822730e4a..189c984c3 100644 --- a/Bugzilla/WebService/Bug.pm +++ b/Bugzilla/WebService/Bug.pm @@ -2446,6 +2446,10 @@ You did not specify a valid for the C<file_name> argument. You did not specify a value for the C<summary> argument. +=item 606 (Empty Data) + +You set the "data" field to an empty string. + =back =item B<History> diff --git a/Bugzilla/WebService/Constants.pm b/Bugzilla/WebService/Constants.pm index e2c0a0f52..0adb190ec 100644 --- a/Bugzilla/WebService/Constants.pm +++ b/Bugzilla/WebService/Constants.pm @@ -148,6 +148,7 @@ use constant WS_ERROR_CODE => { file_not_specified => 603, missing_attachment_description => 604, # Error 605 attachment_url_disabled no longer exists. + zero_length_file => 606, # Errors thrown by the WebService itself. The ones that are negative # conform to http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php |