[Rt-commit] rt branch, 4.0/add-missing-use-lwp-mediatypes, created. rt-4.0.18-121-gb024163
Alex Vandiver
alexmv at bestpractical.com
Tue Dec 17 12:58:16 EST 2013
The branch, 4.0/add-missing-use-lwp-mediatypes has been created
at b02416314b4bd0178730e4f644560565c5688844 (commit)
- Log -----------------------------------------------------------------
commit d72d9297fc2480c0ab0b044770588f53922af1d1
Author: sperrygrove <sperrygrove at gmail.com>
Date: Tue Dec 17 17:24:07 2013 +0000
Adds missing use LWP::MediaTypes statement for guess_media_type
The refactoring of the attachment processing code in the REST interface
in commit 7b6ddfb did not include the use statement for
guess_media_type. The consequence being if you post attachments without
content-type, RT errors and includes a Perl traceback in the API
response.
diff --git a/lib/RT/Interface/REST.pm b/lib/RT/Interface/REST.pm
index 3a85c2d..0023319 100644
--- a/lib/RT/Interface/REST.pm
+++ b/lib/RT/Interface/REST.pm
@@ -47,6 +47,7 @@
# END BPS TAGGED BLOCK }}}
package RT::Interface::REST;
+use LWP::MediaTypes qw(guess_media_type);
use strict;
use warnings;
use RT;
commit b02416314b4bd0178730e4f644560565c5688844
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Dec 17 12:57:53 2013 -0500
Remove unnecessary "use LWP::MediaTypes" lines
The code which needed them was removed in 7b6ddfb
diff --git a/share/html/REST/1.0/Forms/ticket/comment b/share/html/REST/1.0/Forms/ticket/comment
index d00a949..6d48eff 100644
--- a/share/html/REST/1.0/Forms/ticket/comment
+++ b/share/html/REST/1.0/Forms/ticket/comment
@@ -53,7 +53,6 @@ $id
</%ARGS>
<%INIT>
use MIME::Entity;
-use LWP::MediaTypes;
use RT::Interface::REST;
$RT::Logger->debug("Got ticket id=$id for comment");
diff --git a/share/html/REST/1.0/ticket/comment b/share/html/REST/1.0/ticket/comment
index 0999024..5ad62f5 100644
--- a/share/html/REST/1.0/ticket/comment
+++ b/share/html/REST/1.0/ticket/comment
@@ -52,7 +52,6 @@ $content
</%ARGS>
<%INIT>
use MIME::Entity;
-use LWP::MediaTypes;
use RT::Interface::REST;
my $ticket = RT::Ticket->new($session{CurrentUser});
-----------------------------------------------------------------------
More information about the rt-commit
mailing list