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

Call next() after serving HTML #1349

Merged
merged 1 commit into from
Jul 3, 2017
Merged

Call next() after serving HTML #1349

merged 1 commit into from
Jul 3, 2017

Conversation

levibuzolic
Copy link
Contributor

Fixes #1348

Introduced in #1324

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jul 3, 2017

Deploy preview ready!

Built with commit d20629e

https://deploy-preview-1349--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jul 3, 2017

Deploy preview ready!

Built with commit d20629e

https://deploy-preview-1349--gatsbygram.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jul 3, 2017

Deploy preview ready!

Built with commit d20629e

https://deploy-preview-1349--gatsbyjs.netlify.com

@KyleAMathews
Copy link
Contributor

Does this need to be in an else? Or does calling next have no effect if you've already responded? Don't use express much :-)

@levibuzolic
Copy link
Contributor Author

Looking at the docs I think it's a no-op but will put it in an else as it seems to be the common convention.

If the current middleware function does not end the request-response cycle, it must call next() to pass control to the next middleware function. Otherwise, the request will be left hanging.

@levibuzolic
Copy link
Contributor Author

Commit updated.

@KyleAMathews
Copy link
Contributor

Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants