title: Express - passing 2 empty array not working
body: <p>This is strange.
  I am passing 2 empty arrays in my payload and the post call is failing.If I pass only 1 empty array, then the call is successful.</p>
  
  <p>I am using Express: <code>^4.13.0</code>.</p>
  
  <p>Angular Code : </p>
  
  <pre><code>$scope.login = function(){        
    var temp = {};
    temp.username = $scope.username;
    temp.password = $scope.password;
    temp.speed=[]; // &lt;---- code works without this line
    temp.notification=[];
  
    loginService.login(temp).then(function(data){
      $state.transitionTo('root.dashboard');
    }, function(error) {               
      console.log("error" , error);
      $scope.message = error.data.message;
    });
  }
  </code></pre>
  
  <p>Node Route :</p>
  
  <pre><code>app.post('/connect/local', User.login);
  </code></pre>
  
  <p>I am using passport for login strategy.</p>
  
  <p>In the server, I get this error </p>
  
  <pre><code>Error: Can't set headers after they are sent.
      at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:335:11)
      at ServerResponse.header (c:\workspace\HotOrNot\node_modules\express\lib\response.js:718:10)
      at c:\workspace\HotOrNot\main\app\modules\api\User.js:154:13
      at Strategy.strategy.success (c:\workspace\HotOrNot\node_modules\passport\lib\middleware\authenticate.js:194:18)
      at verified (c:\workspace\HotOrNot\node_modules\passport-local\lib\strategy.js:83:10)
      at c:\workspace\HotOrNot\main\app\config\pass.js:52:24
      at Query.&lt;anonymous&gt; (c:\workspace\HotOrNot\node_modules\mongoose\lib\model.js:3343:16)
      at c:\workspace\HotOrNot\node_modules\mongoose\node_modules\kareem\index.js:244:21
      at c:\workspace\HotOrNot\node_modules\mongoose\node_modules\kareem\index.js:127:16
      at doNTCallback0 (node.js:407:9)
      at process._tickCallback (node.js:336:13)
  </code></pre>
  
  <p>Any clue will help.</p>