Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
cee67bdc
Commit
cee67bdc
authored
Feb 10, 2011
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 633041: Add an error code for zero_length_file and fill in content_type
for patches when content_type is missing in Bug.add_attachment in the WebService r=LpSolit, a=LpSolit
parent
04a0f6e7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
Attachment.pm
Bugzilla/Attachment.pm
+8
-3
Bug.pm
Bugzilla/WebService/Bug.pm
+4
-0
Constants.pm
Bugzilla/WebService/Constants.pm
+1
-0
No files found.
Bugzilla/Attachment.pm
View file @
cee67bdc
...
...
@@ -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)\/.+$/
)
{
...
...
Bugzilla/WebService/Bug.pm
View file @
cee67bdc
...
...
@@ -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>
...
...
Bugzilla/WebService/Constants.pm
View file @
cee67bdc
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment