mimetype => \&_check_content_type,
};
+use constant VALIDATOR_DEPENDENCIES => {
+ mimetype => ['ispatch'],
+};
+
use constant UPDATE_VALIDATORS => {
isobsolete => \&Bugzilla::Object::check_boolean,
};
}
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)\/.+$/) {
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