Closed
Bug 633041
Opened 14 years ago
Closed 14 years ago
Bug.add_attachment is missing an error code and should fill in content_type for patches
Categories
(Bugzilla :: Attachments & Requests, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.0
People
(Reporter: mkanat, Assigned: mkanat)
References
Details
Attachments
(2 files)
|
1.94 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
|
1.76 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
When writing the test in bug 629161 I discovered a few issues with Bug.add_attachment:
* It was missing an error code for attaching an empty "data" value.
* You should be able to set "is_patch => 1" without specifying a content type, and the content type should always be forced to "text/plain" for patches, but the backend wasn't doing this properly.
Flags: blocking4.0+
Attachment #511246 -
Flags: review?(LpSolit)
| Assignee | ||
Updated•14 years ago
|
Assignee: attach-and-request → mkanat
Status: NEW → ASSIGNED
Comment 1•14 years ago
|
||
Comment on attachment 511246 [details] [diff] [review]
v1, for 4.0
Looks good, but only works for 4.0. is_url no longer exists in 4.1.
Attachment #511246 -
Attachment description: v1 → v1, for 4.0
Attachment #511246 -
Flags: review?(LpSolit) → review+
| Assignee | ||
Comment 2•14 years ago
|
||
Okay, here's a similar patch for trunk.
Attachment #511555 -
Flags: review?(LpSolit)
Comment 3•14 years ago
|
||
Comment on attachment 511555 [details] [diff] [review]
v1, trunk
>=== modified file 'Bugzilla/Attachment.pm'
>+use constant VALIDATOR_DEPENDENCIES => {
>+ mimetype => ['ispatch', 'isurl'],
>+};
isurl no longer exists on trunk. r=LpSolit with this one removed.
Attachment #511555 -
Flags: review?(LpSolit) → review+
Updated•14 years ago
|
Flags: approval4.0+
Flags: approval+
| Assignee | ||
Comment 4•14 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/Attachment.pm
modified Bugzilla/WebService/Bug.pm
modified Bugzilla/WebService/Constants.pm
Committed revision 7696.
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.0/
modified Bugzilla/Attachment.pm
modified Bugzilla/WebService/Bug.pm
modified Bugzilla/WebService/Constants.pm
Committed revision 7543.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•