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

Add support for \t in content-type header #814

Closed
wants to merge 6 commits into from
Closed

Add support for \t in content-type header #814

wants to merge 6 commits into from

Conversation

rg2011
Copy link
Contributor

@rg2011 rg2011 commented Feb 5, 2024

This PR is a workaround for issue #808 . The main aspects of the workaround are:

  • Replace req.is with typeis.is. type-is is a dependency of express, so this does not add new dependencies.
  • Change the call bodyParser.xml({ ... }) to add the option bodyParser.xml({ type: () => true, ... }, which overrides the internal check of the content-type header that body-parser-xml does.
  • Check the content-type header before parsing the body, by moving the content-type checking code from the parseBody function to a new middleware checkPostContentType that is called before parsing the body.

rg2011 and others added 6 commits November 10, 2023 13:53
* add support for XML payload

* add xml checks

* updated Changelog

* added test case

* fixed mime type checking

* improved backward compatibility

---------

Co-authored-by: rg2011 <[email protected]>
* add support for XML payload

* add xml checks

* updated Changelog

* added test case

* fixed mime type checking

* improved backward compatibility

* added cleanup of namespaces

* fix upload package lock

---------

Co-authored-by: rg2011 <[email protected]>
* fix issue

* use synchronous error notif

---------

Co-authored-by: rg2011 <[email protected]>
remove redundant test

updated comments

fix typo

support xml bindings

removed uneeded feature

removed unneeded error condition

simplified conditions

undo uneeded changes
@warpcomdev warpcomdev closed this by deleting the head repository Feb 22, 2024
@rg2011
Copy link
Contributor Author

rg2011 commented Feb 22, 2024

replaced by #817

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.

2 participants