WebFaction
Community site: login faq

Hi,

This is my conf: Rails 3.0.5 (nginx 0.8.54/Passenger 3.0.3/Ruby Enterprise Edition 1.8.7)

I can't get the Content-Length running on production. Got it in development with WebRick.

I added this to my application.rb without success:

config.middleware.use Rack::ContentLength

Maybe there is something to add in my nginx.conf ?

Here is the response I have in my iPhone app :

"Cache-Control" = "max-age=0, private, must-revalidate";
    Connection = "keep-alive";
    "Content-Encoding" = gzip;
    "Content-Type" = "application/json; charset=utf-8";
    Date = "Tue, 10 Apr 2012 09:53:10 GMT";
    Server = nginx;
    Status = 200;
    "Transfer-Encoding" = Identity;
    "X-Powered-By" = "Phusion Passenger (mod_rails/mod_rack) 3.0.3";
    "X-Runtime" = "6.665039";
    "X-UA-Compatible" = "IE=Edge,chrome=1";

If you have any idea, just tell me. (Already tried to switch off the gzip compression and get same thing)

asked 10 Apr '12, 04:58

muqaddar
178
accept rate: 0%


Hi,

According to the middleware description, this is all you have to do and you shouldn't need to change your nginx.conf file. It would be hard to help with this without looking at the actual app though.

I'd suggest you check the following link, which might explain the problem you are having. If this is not the case in your situation, I'd suggest opening a support ticket, so we can take a closer look.

permanent link

answered 10 Apr '12, 05:54

todork
1.2k4
accept rate: 34%

Well, I think I will open a ticket.

I don't really understand the link answer: I don't want to use chunked response (with HTTP streaming).

(10 Apr '12, 07:07) muqaddar

Ok, thanks. Please make sure to provide enough details in the ticket for us to be able to reproduce the issue.

(10 Apr '12, 07:08) todork
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×186
×1

question asked: 10 Apr '12, 04:58

question was seen: 3,952 times

last updated: 10 Apr '12, 07:08

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM