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

Request hangs during POST with body content #21

Closed
dale3h opened this issue Dec 23, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@dale3h
Copy link

commented Dec 23, 2016

I have a script in the server directory that requires POST method, and it hangs now that I've updated alexa-app-server. I was able to get around this by wrapping the raw body function with:

if (config.verify) {
  ...raw body parser for request verification...
}

It seems like req.on('data', function(data) { does not get called if the POST method is used.

@dale3h

This comment has been minimized.

Copy link
Author

commented Dec 23, 2016

Actually, doing that broke the server. This seems to work in place of the current rawBody parser:

//We need the rawBody for request verification
self.express.use(bodyParser.json({
	verify: function(req, res, buf, encoding) {
		req.rawBody = buf.toString();
	}
}));
@dblock

This comment has been minimized.

Copy link
Collaborator

commented Jan 11, 2017

@dale3h did you dig this up? What should we do with this?

@rickwargo

This comment has been minimized.

Copy link
Collaborator

commented Feb 2, 2017

@dale3h I think I may have had the same issue. While I haven't fixed it, a patch made it work for me. See details at alexa-js/alexa-app#144 (comment)

dblock added a commit to dblock/alexa-app-server that referenced this issue Feb 3, 2017

dblock added a commit to dblock/alexa-app-server that referenced this issue Feb 3, 2017

@dblock dblock closed this in 2f95a7f Feb 5, 2017

dblock added a commit that referenced this issue Feb 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.