similar to: Extended Mime Responder functionality

Displaying 20 results from an estimated 4000 matches similar to: "Extended Mime Responder functionality"

2010 Sep 05
0
Responding to a non-registered MIME type?
I''m trying to figure out how attachments are supposed to work with MIME type-based responses. What makes attachments special is that in many cases they are allowed to be arbitrary files. It would be too restrictive to require that all possible types are registered (Mime::Type.register). Let''s say for GET requests on an attachment resource I want to return metadata if the
2008 Jul 12
1
Re: Re stful_authentication, Internet Explorer, and unwanted http basic dialog
I''m glad I found your post Joshua - it saved me quite a bit of time! To get this to work for me however (IE6), I had to ditch the ||= and do straight assignment: request.format = :html if request.env[''HTTP_USER_AGENT''] =~ /msie/i Joshua Doss wrote: > > > Alter access_denied to add this line (right below "def access_denied"): > >
2007 Feb 08
3
testing ajax responder actions
I have an Ajax responder method which uses respond_to to make sure it only works with Ajax. I''m having trouble figuring out how to call this action successfully. I''m using Rails 1.2.x. Any thoughts? -- Cheers, Kevin Williams http://www.almostserio.us/ "Any sufficiently advanced technology is indistinguishable from Magic." - Arthur C. Clarke
2006 Apr 10
1
routing
I have this in my routes.rb: ... map.connect ":action/:id", :controller => "default_controller" .. It worked nicely, until I added a second controller to my project. The new (second) controller is "Admin". The problem is I cant reach the actions in the second controller. http://mysite.com/some_action is routed to some_action in default_controller. That is
2007 Sep 19
4
Ticket #190 (friendlier way to add / register a mime type)
Following up on #190 [1], I''ve just added a simple patch that allows the manipulation of the TYPES hash from within the Merb module. Use like: Merb.add_mime_type(:png,%w[image/png]) Merb.remove_mime_type(:png) It specifically disallows the removal of the :all MimeType, since content negotiation relies on it. I''m not super wonderful at API design, so comments and
2009 Apr 03
7
RJS not rendering correctly when mime-type is 'iphone'
I have an iPhone version of my site, and for some reason none of the rjs works when viewing the iPhone version. This happens instead: ActionView::MissingTemplate (Missing template controller_name/ update.erb in view path app/views) The rjs works fine when viewing the site normally, and it worked when viewing the iPhone version prior to upgrading Rails to 2.3.2. Additional info: I have
2005 Nov 03
4
shared-mime-info (PR#8278)
Full_Name: Vaidotas Zemlys Version: 2.1.1 OS: Ubuntu 05.10 Submission from: (NULL) (213.197.173.50) Hi, This is really a feature request, not a bug. I wrote the mail to R-devel, but nobody answered it. I use Gnome on my computer and sometimes I use its default text editor gedit. It uses gtksourceview library for syntax highlighting. I decided that it would be nice if gedit supported R
2010 Sep 09
1
406 Not Acceptable with swfupload
---------flash_session_cookie_middleware.rb require ''rack/utils'' class FlashSessionCookieMiddleware def initialize(app, session_key = ''_session_id'') @app = app @session_key = session_key end def call(env) if env[''HTTP_USER_AGENT''] =~ /^(Adobe|Shockwave) Flash/ req = Rack::Request.new(env) params =
2006 Apr 07
1
[FYI] issues with integration testing
I was working on an integration test to test login/logout functionality and came across an issue that took me a bit to figure out. In one of my controllers, I have to test the request.env["HTTP_USER_AGENT"] value as a portion of the app will be access by Windows CE hand-helds. in the controllers index action i had the lines logger.info "user agent: " +
2006 Jun 08
0
custom mime types for respond_to
Is there a way to add a mime type of my own to respond_to ? There''s html, xml, js, ical etc ... But I want to be able to respond_to Excel. Excel has the following content-type header: application/vnd.ms-excel I want to use the new ?format=xml querystring parameters that respond_to can respond to. So I want to pass in ?format=xsl or ?format=ms-excel so that I can return my results
2013 Mar 06
2
Refresh a partial onClick using ajax call in rails 3.x
Hi All, I want to refresh a partial onClick, onClick i am making ajax call and getting the data but i am unable to refresh the partial. here is the code IN views: home.html.erb $(document).ready(function() { var currentCellText; $(".inline").click(function() { currentCellText = $(this).text(); $.ajax({ type: ''GET'', dataType: "json",
2007 Sep 01
0
Problem with custom Mime::Type.register.
Hello all, I''m running into a slight problem with Rails and the respond_to function in controllers. I''ve registered a custom Mime::Type of application/x-amf :amf (Mime::Type.register "application/x-amf", :amf). The problem I''m having is that the respond_to function never responds to the application/x-amf content-type. I think I''ve narrowed it down to
2008 Jan 16
0
respond_to, mime types and excel
Hello All, I''m trying to figure out how respond_to actually works, especially with the increased focus on REST. After I set a MIME type for Excel Mime::Type.register "application/vnd.ms-excel", :xls In my index action''s respond_to block I have format.xls { @parts = Part.find(:all) headers[''Content-Type''] =
2007 May 29
1
Headers munged into RAW_POST_DATA
Hi, we''re seeing a really weird problem in our production environment. "Connection: Keep-Alive\r\n" is being pre-pended to the RAW_POST_DATA, which makes requests error out. This bug is seen infrequently and *seems* to be browser-related, although I can''t reproduce it using the browser reported in HTTP_USER_AGENT. Set up is a hardware load balancer (NetScaler)
2008 Sep 30
4
Using the response object in stories
I have this statement in the layout of my application (using haml) - if request.env["HTTP_USER_AGENT"].include?("MSIE") = stylesheet_link_tag ''blueprint/ie.css'' = stylesheet_link_tag ''confirm_ie.css'' The problem is that request.env["HTTP_USER_AGENT"] is nil when I go to some page in the features I write with cucumber and webrat
2006 Jan 22
6
*Very* basic layout question
I''m trying to use a different layout for just one action in my controller, all the other actions use the application.rhtml layout, so what i''m doing is ... class SomeController < ApplicationController layout "simple", :only=> :some_action ...... end and the "simple" layout is applied to all the actions, can someone please give me a hint?
2007 May 30
0
Headers munged into RAW_POST_DATA
Hi, we''re seeing a really weird problem in our production environment. "Connection: Keep-Alive\r\n" is being pre-pended to the RAW_POST_DATA, which makes requests error out. This bug is seen infrequently and *seems* to be browser-related, although I can''t reproduce it using the browser reported in HTTP_USER_AGENT. Set up is a apache 2.2 -> hardware load balancer
2006 Jan 23
8
yield vs @content_for_layout, etc..
I am relatively new to RoR and Ruby for that matter. A few questions for the pros: Question 1: In the 5min ajax video the presenter uses <%= yield %> in his layout. In the agile book, @content_for_layout is used. Since, yield is an actual Ruby construct, is it more efficient and preferred? What is the difference? Question 2: Links are often of the form :action =>
2006 Mar 13
0
Turn off Responder for PeriodicalExecuter?
I''ve got a PeriodicalExecuter refreshing some content on my homepage. I''ve also got a Responder popping up a ''Working...'' box when ajax calls are being made. Is there a way to tell the Responder not to run when the PE is running? I''m new to prototype and scriptaculous so no assumptions of my knowledge are too low. :)
2004 Aug 06
3
icecast2 ogg vorbis client request headers
> You must have some other, unrelated, problem, presumably elsewhere in your > code. this is what i have, and does work with mp3, but ogg does not want to work. im testing with winamp, you think that may be the issue? <p><p>fwrite($fp,"GET /mymp3 HTTP/1.1\nUser-Agent:$HTTP_USER_AGENT\n\n"); for ($i=0; $i<120; $i++) { if (feof($sp)) break; $str.=fread($sp,4096);