title: node.js empty reply from the server
body: <p>I have developed an API using node.js. In my local system API is running at port 2100, and i used the following curl command</p>
  
  <pre><code>curl -i -H "Content-Type: application/json" -X GET http://localhost:2100/xx/yy/zzz
  </code></pre>
  
  <p>And i received the following response:</p>
  
  <blockquote>
    <p>HTTP/1.1 401 Unauthorized
        X-Powered-By: Express
        Vary: Accept-Encoding
        WWW-Authenticate: Bearer realm="Users"
        Set-Cookie: connect.sid=s%3A-qD8JTJTLNTnbc0bv2YsTcd2.sfJK8%2FOFan26l8QhuS4oxyEvUtGvhztevEcWX51kceE;
    Path=/; HttpOnly
        Date: Wed, 06 May 2015 09:31:30 GMT
        Connection: keep-alive
        Transfer-Encoding: chunked</p>
  </blockquote>
  
  <p>Because i am using authorization i received the above response.</p>
  
  <p>But in my production system i used the same curl command but i am receiving </p>
  
  <blockquote>
    <p>curl: (52) Empty reply from server</p>
  </blockquote>
  
  <p>I dont know whats happening? I searched a lot but i cant find a solution. Please share your ideas.</p>
  
  <p>EDIT:</p>
  
  <p>MY API has crashed due to this error:</p>
  
  <blockquote>
    <p>Exception: Error setting TTL index on collection : sessions",</p>
  </blockquote>
  
  <p>MY code:</p>
  
  <pre><code>app.use(express.session({
              secret: 'MEAN',
              store: new mongoStore({
                  url: config.dbmongo.db,//db
                  collection: 'sessions'
              })
          }));
  </code></pre>
  
  <p>Can you please explain what i am doing wrong?</p>