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

use the ability of content-type lib directly #1276

Merged
merged 1 commit into from Dec 7, 2018

Commits on Dec 3, 2018

  1. use the ability of content-type lib directly

    As we can see the doc of `content-type`: [https://github.com/jshttp/content-type#contenttypeparsereq](https://github.com/jshttp/content-type#contenttypeparsereq), it can deal with the original `req` directly and will also throw the exception when `Content-Type` is missing or unvalid. So in my opinion, we don't need `let type = this.get('Content-Type');` to get the type and `if (!type) return ''` to check if the type is unvalid.
    mingmingwon committed Dec 3, 2018
    Configuration menu
    Copy the full SHA
    dd27a08 View commit details
    Browse the repository at this point in the history