--> http://railsforum.com/viewtopic.php?pid=71435#p71435 bug or feature? Thanks in advance Clemens --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
worksforme On Mon, Aug 11, 2008 at 4:22 PM, fx3000se <clemens.wyss@gmx.ch> wrote:> > --> http://railsforum.com/viewtopic.php?pid=71435#p71435 > bug or feature? > Thanks in advance > Clemens > > > >-- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
what environment do you have? Mine: win32 ruby 1.8.6-p111 rails 2.1.0 (mongrel 1.1.5 which is not relevant for the testcase) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On 11 Aug 2008, at 15:43, Michael Koziarski wrote:> > worksforme >I had a look - when actually running through the browser, a Content- Type header is sent out as you would expect, but inside functional tests it does look a bit odd. The interesting method in response.rb is def convert_content_type! if content_type = headers.delete("Content-Type") self.headers["type"] = content_type end if content_type = headers.delete("Content-type") self.headers["type"] = content_type end if content_type = headers.delete("content-type") self.headers["type"] = content_type end end Ruby''s cgi library in turn will convert a type entry into a Content- Type one (you can see this in cgi.rb, in the header method) Don''t know why it does this (i''ve always thought of cgi.rb as rather crufty) Fred> On Mon, Aug 11, 2008 at 4:22 PM, fx3000se <clemens.wyss@gmx.ch> wrote: >> >> --> http://railsforum.com/viewtopic.php?pid=71435#p71435 >> bug or feature? >> Thanks in advance >> Clemens >> >>> >> > > > > -- > Cheers > > Koz > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Hence Response>>convert_content_type! must have changed/entered btw rails 1.1.6 and 2.1.0 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
On 11 Aug 2008, at 17:12, fx3000se wrote:> > Hence Response>>convert_content_type! must have changed/entered btw > rails 1.1.6 and 2.1.0 >What I was trying to explain was that it doesn''t matter - cgi.rb converts the type option to a Content-Type one when it writes the header Inside a test of course you don''t go via cgi and so you see the difference you noted. You can isolate yourself from that difference by going via @response.content_type Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---