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