Jay
cbda78552b
Revert "Bug/allow header to contain http verb keys #1252 ( #1258 )" ( #2977 )
...
This reverts commit 920510b3a6 .
2020-05-22 21:44:26 +02:00
David Ko
920510b3a6
Bug/allow header to contain http verb keys #1252 ( #1258 )
...
* Failing test for #1252
* Only delete header keys that match an HTTP verb if the value is a non-string
Co-authored-by: David Ko <david.ko@pvtmethod.com >
Co-authored-by: Jay <jasonsaayman@gmail.com >
2020-05-22 21:26:10 +02:00
Alan Wang
885ada6d9b
Fixing getting local files (file://) failed ( #2470 )
...
* fix issue #2416 , #2396
* fix Eslint warn
* Modify judgment conditions
* add unit test
* update unit test
* update unit test
2020-03-23 21:49:38 +08:00
Xianming Zhong
2034c1db7e
Fix tests in browsers ( #2748 )
2020-02-15 15:54:43 +08:00
Jonathan Sharpe
77f0ae4f61
Fix merging of params ( #2656 )
...
* Name function to avoid ESLint func-names warning
* Switch params config to merge list and update tests
* Restore testing of both false and null
* Restore test cases for keys without defaults
* Include test for non-object values that aren't false-y.
2020-02-15 13:36:52 +08:00
Xianming Zhong
c7488c7dd5
Remove unnecessary XSS check introduced by #2451 ( #2679 )
...
* Remove unnecessary XSS check introduced by #2451
* Remove test file of `isValidXss`
2020-01-20 09:20:33 -07:00
Angelos Chalaris
1a32ca0601
Remove dependency on is-buffer ( #1816 )
...
* Remove dependency on is-buffer from package.json
2019-11-17 22:53:27 -08:00
Yasu Flores
841466416b
Fix XSS logic that matched some valid urls ( #2529 )
...
* Fix XSS logic that matched some valid urls, e.g. "/one/?foo=bar", when it shouldn't match those
2019-11-07 18:39:24 -08:00
Felipe Martins
097948698a
Revert "Update Webpack + deps, remove now unnecessary polyfills" ( #2479 )
...
* Revert "Update Webpack + deps, remove now unnecessary polyfills (#2410 )"
This reverts commit 189b34c45a .
* Fix build (#2496 )
* Change syntax to see if build passes
* Test commit
* Test with node 10
* Test adding all browsers in travis
* remove other browsers when running on travis
2019-10-25 11:34:47 -03:00
Yasu Flores
494d817314
Change syntax to see if build passes ( #2488 )
...
* Change syntax to see if build passes
* Test commit
* Test with node 10
* Test adding all browsers in travis
* remove other browsers when running on travis
2019-10-25 11:25:53 -03:00
Avindra Goolcharan
189b34c45a
Update Webpack + deps, remove now unnecessary polyfills ( #2410 )
...
* Update deps
* handles webpack 1 -> 4 migration
* remove promise helpers from dev files
assume `Promise` is available, or polyfilled by
the consumer
* Remove isArray util. `isArray` has good coverage, even
in IE9. So lets remove the custom polyfill.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
also resolves a few lint issues
* Remove trim util
String.protoype.trim has good coverage (including IE9)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim
Also, the http adapter already uses the native method.
2019-10-21 15:56:29 -03:00
Yasu Flores
29da6b24db
Fix to prevent XSS, throw an error when the URL contains a JS script ( #2464 )
...
* Fixes issue where XSS scripts attacks were possible via the URL
* Fix error
* Move throwing error up
* Add specs and make regex cover more xss cases
2019-10-16 07:53:10 -03:00
Wataru
19969b4fbd
Fixing Vulnerability A Fortify Scan finds a critical Cross-Site Scrip… ( #2451 )
...
* Fixing Vulnerability A Fortify Scan finds a critical Cross-Site Scripting
* use var insted of const
2019-10-08 21:23:34 -03:00
Felipe Martins
c282e7ea8e
Fix cancellation error on build master. #2290 #2207 ( #2407 )
2019-09-12 23:45:06 -03:00
Rafael Renan Pacheco
a11cdf4683
Fixing custom config options ( #2207 )
...
- fixes #2203
2019-09-06 21:40:04 -03:00
DIO
89bd3abe9a
Axios create url bug ( #2290 )
...
* Fix #2234
* added spacing --eslint
* added test cases
* removed unexpected cases after updating the code
2019-09-06 12:45:18 -03:00
multicolaure
6fe506fda2
Do not modify config.url when using a relative baseURL ( resolves #1628 ) ( #2391 )
...
* Adding tests to show config.url mutation
Because config.url is modified while processing the request
when the baseURL is set,
it is impossible to perform a retry with the provided config object.
Ref #1628
* Fixing url combining without modifying config.url
As config.url is not modified anymore during the request processing.
The request can safely be retried after it failed with the provided
config.
resolves #1628
2019-09-05 12:43:55 -03:00
Anatoly Ryabov
81eaa3db4c
Fixing building url with hash mark ( #1771 )
...
This commit fix building url with hash map (fragment identifier) when parameters are present: they must not be added after `#`, because client cut everything after `#`
2018-09-04 09:53:57 +02:00
Ayush Gupta
b681e919c4
Adding isAxiosError flag to errors thrown by axios ( #1419 )
2018-08-20 11:02:23 +02:00
Tim Johns
6b44e80ade
Added toJSON to decorated Axios errors to faciliate serialization ( #1625 )
2018-08-06 23:33:55 -06:00
Rikki Gibson
33747ee8fb
Remove usages of isOldIE in tests
2018-08-06 09:56:51 +02:00
Rikki Gibson
962c38b2a6
Remove isOldIE check in tests
2018-08-06 09:56:51 +02:00
Rikki Gibson
a9831131c3
Remove HTTP 1223 handling
...
The 1223 error was fixed in IE 10. See https://blogs.msdn.microsoft.com/ieinternals/2012/03/01/internet-explorer-10-consumer-preview-minor-changes-list/
2018-08-06 09:56:51 +02:00
Rikki Gibson
1c2881cbe6
Remove btoa polyfill tests
2018-08-06 09:56:51 +02:00
Nick Uraltsev
ec97c686ef
Merge pull request #1395 from codeclown/instance-options
...
Fixing #385 - Keep defaults local to instance
2018-04-10 15:28:12 -07:00
Martti Laine
143bbbe1b9
Spec for mergeConfig, finalize logic
2018-04-07 15:54:56 +02:00
Martti Laine
506d4e8941
Unit tests for deepMerge
2018-04-03 22:19:38 +02:00
mattridley
762044e453
Fixing #537 Rejecting promise if request is cancelled by the browser
2018-03-05 16:11:55 +00:00
Martti Laine
5bfd2ea9f6
Fixing #385 - Keep defaults local to instance
2018-03-02 12:31:15 +02:00
Nick Uraltsev
26b06391f8
Update links
2017-09-28 21:09:47 -07:00
Tyler Brown
fb08e95603
Duplicate header handling ( #874 )
...
* Update parseHeaders to match node http behavior
Node ignores duplicate entries for certain HTTP headers.
It also always converts the `set-cookie` header into an array.
* add tests for new duplicate header handling
* clarify comment
2017-08-12 14:58:10 +02:00
Haven
2b8562694e
Fixing baseURL not working in interceptors ( #950 )
...
* Fixing baseURL not working in interceptors
* add test for modify base URL in request interceptor
2017-08-12 14:15:27 +02:00
杨春旭
e4e32120ce
Convert the method parameter to lowercase
2017-05-31 22:53:11 +08:00
Rubén Norte
e0d59eb29b
Adding failing tests that verify errors contain the request
2017-04-08 21:43:04 +02:00
Nick Uraltsev
2fe95621b0
Merge pull request #461 from theikkila/master
...
Add OPTIONS-method as a shortcut
2017-03-26 21:06:24 -07:00
Nick Uraltsev
6d7e6fa222
Merge pull request #670 from 38elements/test
...
Updating test for adapter
2017-03-01 22:38:26 -08:00
Nick Uraltsev
36d97e525d
Fixing broken test
2017-03-01 20:40:55 -08:00
38elements
f034c56466
Updating test for adapter
2017-01-30 13:49:50 +09:00
Lochlan Bunn
fe7d09bb08
Fixing combineURLs to support an empty relativeURL ( #581 )
...
* Fixing combineURLs to support an empty relativeURL
When combining the base and relative URLs, we should forego force
appending a slash to the base when the relative URL is empty.
This leads to a semantic url.
* Fixing combineURLs, allowing single slash relatives
2016-12-07 21:23:45 -08:00
Nick Uraltsev
6d0e19343a
Fixing bug with custom intances and global defaults
2016-11-26 18:17:21 -08:00
Nick Uraltsev
d963368960
Adding get, head, and delete to defaults.headers
2016-10-29 22:57:53 -07:00
Nick Uraltsev
46a9639ef2
Fixing sporadically failing tests
2016-10-29 21:58:06 -07:00
Nick Uraltsev
3fcf54ff36
Fixing issue with calling cancel after response has been received
2016-10-17 18:20:13 -07:00
Teemu Heikkilä
2e0adc1cae
Add OPTIONS-method as a shortcut
2016-09-29 18:54:17 +03:00
Nick Uraltsev
216e2a6787
Adding axios.isCancel method
2016-09-21 18:47:37 -07:00
Nick Uraltsev
72dd897bb5
Adding cancellation support
2016-09-17 11:52:56 -07:00
Nick Uraltsev
df50698d5a
Merge branch 'master' into cancel
2016-09-15 21:09:29 -07:00
Nick Uraltsev
b2bc3354ac
Adding Cancel and CancelToken classes
2016-09-15 21:06:32 -07:00
Rubén Norte
b8f6f5049c
Fixing forEach test
2016-09-12 20:51:23 +02:00
Tony L. Kerz
077153a0a7
[for-each] has-own-prop issue node
2016-09-11 09:15:22 -04:00