Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid setting body for GET requests (#3643)
* fix: avoid setting body for GET requests When making a GET request to certain uplinks, such as https://registry.npmmirror.com, setting the body field can result in a 413 error. Previously, the code was setting the body field for all requests, including GET requests. This commit fixes the issue by checking the request method and avoiding setting the body field for GET requests. This ensures that GET requests are not affected by the issue and can be made without error. Fixes #3601 * add missing deps for run test locally * test(up-storage): add unit test about uplink is npmmirror Cause thers is a bug in `isObject` function from `@verdaccio/core`, when `options.json` is `true` GET request body will be string 'true', some uplinks might return 413 status code such as https://registry.npmmirror.com fix #3601 * chore(deps): update @verdaccio/core --------- Co-authored-by: Juan Picado <juanpicado19@gmail.com> Co-authored-by: botao <botao@tal.com>
- Loading branch information
1 parent
164d9d2
commit e4573c7
Showing
7 changed files
with
60 additions
and
9 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file added
BIN
+63.4 KB
.yarn/cache/@verdaccio-core-npm-6.0.0-6-next.62-8bb88ecdeb-628c35522e.zip
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters