I am lost here. I have a very simple action:
# DELETE /bookings/{id}
def destroy
adapter = adapter_for(@booking.chain_id)
adapter.cancel(@booking)
if @booking.update_attribute(:cancelled, true)
head :no_content
else
raise BookingGatewayError::SuccessfulButUnregistered
end
end
that returns a 204 if successful. In all my trials and in hello world
applications I''ve done to debug this the Content-Length is 1 (you know
Rails unconditionally sends a space as a workaround for Safari):
HTTP/1.1 204 No Content
Connection: close
Date: Tue, 29 Jan 2008 18:05:16 GMT
Status: 204 No Content
X-Runtime: 0.00507
Cache-Control: no-cache
Server: Mongrel 1.1.3
Content-Type: text/html; charset=utf-8
Content-Length: 1
but same rails in vendor, same mongrel, same everything I can think of
gives a 0 in the production server:
HTTP/1.1 204 No Content
Date: Tue, 29 Jan 2008 18:20:07 GMT
Server: Mongrel 1.1.3
Status: 204 No Content
X-Runtime: 0.09667
Cache-Control: no-cache
Content-Type: text/html; charset=utf-8
Content-Length: 0
What could explain that 0?
-- fxn
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
fxn-xlncskNFVEJBDgjK7y7TUQ@public.gmane.org
2008-Jan-29 18:16 UTC
Re: mysterious Content-Length: 0
On Jan 29, 6:40 pm, Xavier Noria <f...-xlncskNFVEJBDgjK7y7TUQ@public.gmane.org> wrote: There''s nothing like explaining something to find it out. I''ve remembered in production mod_proxy is running and it isn''t in development or in the rest of the trials. I could reproduce it that way, looks like the Apache module is ignoring that somehow. Perhaps it ignores the response body altogether because it is a 204? I''ll try to continue figuring out what''s up with mod_proxy, but at least I have a hint now. This is relevant because it means if you are behind mod_proxy the workaround is nullified. -- fxn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---