Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid cookie header despite strictHeader: false, ignoreErrors: true #3516

Closed
danielb2 opened this issue Jun 7, 2017 · 0 comments
Closed

Invalid cookie header despite strictHeader: false, ignoreErrors: true #3516

danielb2 opened this issue Jun 7, 2017 · 0 comments
Assignees
Milestone

Comments

@danielb2
Copy link
Contributor

@danielb2 danielb2 commented Jun 7, 2017

What are you trying to achieve or the steps to reproduce?

Invalid cookie header despite strictHeader: false, ignoreErrors: true

when sending ;;

const Hapi = require('hapi');
const Hoek = require('hoek');
const server = new Hapi.Server();

server.connection({
    port: 8411,
    state: {
        strictHeader: false,
        ignoreErrors: true
    }
});

server.start((err) => {

    Hoek.assert(!err, err);
    console.log('Server started at: ' + server.info.uri);
});

const handler = function (request, reply) {

    return reply('omg');
};

server.route({ method: 'GET', path: '/', handler });

curl 'http://localhost:8411' -H 'Cookie: foo=bar;;'

What was the result you received?

{"statusCode":400,"error":"Bad Request","message":"Invalid cookie header"}

What did you expect?

omg

Context

  • node version: v6.9.1
  • hapi version: 16.4.1
  • os: Darwin nero.local 16.0.0 Darwin Kernel Version 16.0.0:
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants