[
https://issues.apache.org/jira/browse/OLIO-36?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
William Sobel resolved OLIO-36.
-------------------------------
Resolution: Fixed
Added the content types. In image.rb append the new content type to the
existing list so we don't modify the vendor code.
Author: wsobel
Date: Wed Jan 28 18:23:01 2009
New Revision: 738575
URL: http://svn.apache.org/viewvc?rev=738575&view=rev
Log:
OLIO-36: Added charset to content types for attachment fu. (Mandy Waite)
Modified:
incubator/olio/webapp/rails/trunk/app/models/document.rb
incubator/olio/webapp/rails/trunk/app/models/image.rb
Modified: incubator/olio/webapp/rails/trunk/app/models/document.rb
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/app/models/document.rb?rev=738575&r1=738574&r2=738575&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/app/models/document.rb (original)
+++ incubator/olio/webapp/rails/trunk/app/models/document.rb Wed Jan 28
18:23:01 2009
@@ -11,7 +11,8 @@
class Document < ActiveRecord::Base
- has_attachment :content_type => ['application/pdf', 'application/msword',
'text/plain'],
+ has_attachment :content_type => ['application/pdf', 'application/pdf;
charset=ISO-8859-1',
+ 'application/msword', 'text/plain'],
:storage => :file_system,
:path_prefix => DOCUMENT_STORE_PATH
Modified: incubator/olio/webapp/rails/trunk/app/models/image.rb
URL:
http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/app/models/image.rb?rev=738575&r1=738574&r2=738575&view=diff
==============================================================================
--- incubator/olio/webapp/rails/trunk/app/models/image.rb (original)
+++ incubator/olio/webapp/rails/trunk/app/models/image.rb Wed Jan 28 18:23:01
2009
@@ -13,6 +13,10 @@
# thumbnail :string(255)
#
+unless Technoweenie::AttachmentFu.content_types.include? 'image/jpeg;
charset=ISO-8859-1'
+ Technoweenie::AttachmentFu.content_types << 'image/jpeg; charset=ISO-8859-1'
+end
+
class Image < ActiveRecord::Base
has_attachment :content_type => :image,
:storage => :file_system,
> Olio Rails driver causes no data to be added to the DB due to Session
> management issues
> ---------------------------------------------------------------------------------------
>
> Key: OLIO-36
> URL: https://issues.apache.org/jira/browse/OLIO-36
> Project: Olio
> Issue Type: Bug
> Components: rails-driver
> Environment: OpenSolaris 2008.11 for SUT, DB and Faban
> Reporter: Mandy Waite
> Assignee: William Sobel
> Attachments: Rails_RandomUtil_main.patch, Rails_UIDriver_main.patch
>
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> This by necessity is a meta-bug as all of the described issues were fixed in
> order to make the driver work correctly during testing.
> When running tests on the Olio Rails Driver, the following issues were
> observed (some were masked by others):
> - doAddEvent() is always called in a new and separate session and so fails
> - doPersonDetail() is always called in a new and separate session and so fails
> - doAddAttendee() is always called in a new and separate session and so fails
> - Olio Rails application requires use of authenticity_token exchange between
> it and client for many ops
> - Post Parameters for event_image and event_document are incorrectly specified
> - Post Parameters added with the correct 'content_type' so as to be
> acceptable to the Rails app
> - Rails app needs changing to accept content_typeS with '; charset=..." (Side
> effect of using Apache HttpClient Parts)
> - Phone numbers generated by RandomUtil don't work with the Rails App
> - Scraping of event page results in some invalid event ids being used to view
> events
> - Timing for doAddEvent() is measured even if the op isn't run (no-op'd
> because user not logged on)
> - Parsing of images from responseBuffer fails as it expects the
> responseBuffer to be the same as with the PHP app
> - Error message when trying to view user but not logged on due to state
> transition from addPerson to PersonDetail
> - EventDetailImages metric target is set to > 9 when there is only 1 image on
> each event page
> - Had to change Timing to manual in several ops because of the use of Apache
> HttpClient
> - FileLoader.java uses wrong names for thumbnails
> Most of the fixes involve using the Apache HttpClient instead of the Faban
> HttpTransport which allows better support for Session management and for the
> uploading of files within a User Session. Others come about because parts of
> the driver are still looking for the app to behave as per the PHP App.
> Particular in terms of what data the app will accept and what data it
> returns.
> I'm willing to break this out in to separate bugs, but it would be difficult
> to address them all separately so it's better to deliver the fixes as a
> single patch. There are also some additions required on the app side, as the
> Apache HttpClient insists on adding 'charset=' to the content_type field
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.