title: duplicate request from the client express nodejs
body: <p>i have a problem in my app that i cant resolve</p>
  
  <p>first of all my app:</p>
  
  <p>nodejs 0.8.14
  express 3.1
  passport-local 0.1</p>
  
  <p>the problem is when i login in passport session the client request the page two times...</p>
  
  <p>i discover that because i put a request var in the url</p>
  
  <p>this in my router</p>
  
  <pre><code>exports.index=function(req,res)
  {
      console.log('success: '+req.url);
      var sesion_usuario=validate(req.params.code_user);//if not valid return null
      if(sesion_usuario){
          res.render('logged',{title:'Hello'+sesion_usuario})
  </code></pre>
  
  <p>this in my browser</p>
  
  <pre><code>http://localhost:8000/YOGE7419
  </code></pre>
  
  <p>this in my app</p>
  
  <pre><code>app.get('/:code_user',routes.index);
  </code></pre>
  
  <p>and this is what im receiving in my prompt</p>
  
  <pre><code>success: /YOGE7419
  success: /YOGE7419
  DEBUG: validate error: maxlength not match
  </code></pre>
  
  <p>and the url transform in this</p>
  
  <pre><code>http://localhost:8000/YOGE7419#sthash.zp1bOY2d.dpbs
  </code></pre>
  
  <p>why is that??? whats happening between first and second request??
  tnx</p>
  
  <p>APP CONFIGURATION</p>
  
  <pre><code>app.configure(function()
  {
      app.use(express.favicon(__dirname + '/public/images/favicon.png')); 
      app.set('port',  8000 || process.env.PORT);
      app.set('views', __dirname + '/views');
      app.set('view engine', 'jade');
      app.set('view options',{layout:false});
      //app.use(express.logger('dev'));
      app.use(express.bodyParser({uploadDir:'./public/uploads/'}));
      app.use(express.cookieParser('nomatherwhatdoyoudobatman'));
      app.use(express.session());
      app.use(passport.initialize());
      app.use(passport.session());
      //app.use(express.methodOverride());
      app.use(app.router);
  app.use(express.static(path.join(__dirname, 'public')));
      app.use(function(req, res, next){
          res.render('404.jade',
              {
                  title: "404 - Page Not Found",
                  showFullNav: false,
                  status: 404,
                  url: req.url
              });
      });
  });
  </code></pre>