How to return truly empty body in rails? i.e. content-length 0 -


I am trying to return 200 positions with an empty body, but the rail gives one body with one place is. For example, content-length 1

For example, this code generates a space with one location

  response_to do | F | F.html {head: ok} end  

and so does

  response_to do | F | F.html {Render: None = & gt; True} End  

Yes, Even Presenting: Nothing generates anything

This is a bug in Safari from all the 2005 patch It seems to be designed to fix, where this body was empty, where the header will be ignored. ()

Does anyone have an idea with a truly empty body after achieving 200 levels? Background: I'm using an API that calls my controllers. I need to send 200 but the single space body gives API error (parse error ...). Apart from this, I'm deploying on the Hiroki so that I can not pull ActionPack to restore the hack for 2005.

Thanks for any thoughts

It seems to work

  render: text = & gt; " 

For Rail 3, you can use it:

Render: None = & gt; True

In Rail 5, render: nothing =>

  DIFE Action Head: OK End  

For Credit Rail 5 Solutions.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -