this is the code for the jsonp goliath middleware:
https://github.com/postrank-labs/goliath/blob/master/lib/goliath/rack/jsonp.rb
all is fine except the headers contain a content-length less than the actual.
i'm not sure why where or why its setting a content length less than the actual perhaps its because of this:
"#{env.params['callback']}(#{response})" the extra callback method name that is included in the returning body wasn't accounted for.
The solution i could think of is modify the headers before this method post_process is called so the headers content-length would be correct.
im unsure where to do that though.