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

Proxy handler not forwarding request payload #2468

Closed
aarmour opened this issue Mar 13, 2015 · 0 comments
Closed

Proxy handler not forwarding request payload #2468

aarmour opened this issue Mar 13, 2015 · 0 comments
Assignees
Labels
Milestone

Comments

@aarmour
Copy link

@aarmour aarmour commented Mar 13, 2015

Using the following example:

var Hapi = require('hapi');

var server = new Hapi.Server();
var server1 = server.connection({port: 8000});
var server2 = server.connection({port: 8001});

server1.route({
  path: '/proxy',
  method: 'POST',
  handler: {
    proxy: {
      uri: 'http://127.0.0.1:8001/proxied'
    }
  }
});

server2.route({
  path: '/proxied',
  method: 'POST',
  handler: function (request, reply) {
    reply(request.payload);
  }
});

server.start();

With:

curl -XPOST 127.0.0.1:8000/proxy -H 'content-type:application/json' -d '{"foo":"bar"}'

v8.2.0 returns {"foo":"bar"} and v8.3.1 returns {}.

@hueniverse hueniverse added the bug label Mar 13, 2015
@hueniverse hueniverse self-assigned this Mar 13, 2015
@hueniverse hueniverse added this to the 8.3.2 milestone Mar 13, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants