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
Rikki Gibson
21ae22dbd3
Preserve HTTP method when following redirect ( #1758 )
...
Resolves #1158
This modifies http.js to uppercase the HTTP method, similar to xhr.js, before passing the request off to the transport. This causes follow-redirects to preserve the HTTP method when automatically making a request to the next URL.
2018-08-27 17:26:38 +02:00
Ayush Gupta
b681e919c4
Adding isAxiosError flag to errors thrown by axios ( #1419 )
2018-08-20 11:02:23 +02:00
Chance Dickson
38de25257c
Adding support for no_proxy env variable ( #1693 )
...
* Adding support for no_proxy env variable
* Adds support for the no_proxy environment variable commonly available
with programs supporting the http_proxy/https_proxy environment
variables.
* Adds tests to test the no_proxy environment variable.
* Adding documentation for the proxy env variables
* Adds documentation to README.md for the supported, conventional
http_proxy, https_proxy, and no_proxy environment variables.
2018-08-07 11:52:04 -06: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
Justin Beckwith
98080381fa
test: use mocha instead of nodeunit ( #1655 )
2018-07-05 22:41:13 -07:00
Mark van den Broek
787c808c04
Fix: Removes usage of deprecated Buffer constructor. ( #1555 ) ( #1622 )
2018-07-04 23:47:17 -07:00
Stephan Schneider
73cab975f0
typings: allow custom return types
...
response interceptor might change the type from AxiosResponse to anything they like
2018-06-18 10:48:29 +02:00
Martti Laine
961ecd129c
Correctly catch exception in http test ( #1475 )
2018-04-11 09:23:01 -06: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
Justin Beckwith
c65065ac0f
capture errors on request data streams
2018-03-15 22:12:42 -07:00
Andrew Scott
f9373e96f2
Added tests for additional type parameters
2018-03-07 22:17:44 -08:00
mattridley
762044e453
Fixing #537 Rejecting promise if request is cancelled by the browser
2018-03-05 16:11:55 +00:00
Martti Laine
0445d6c39e
Merge branch 'master' into instance-options
2018-03-02 12:32:47 +02:00
Martti Laine
5bfd2ea9f6
Fixing #385 - Keep defaults local to instance
2018-03-02 12:31:15 +02:00
Emily Morehouse
4ea77b70b7
Follow up to #1070 :
...
- Adding information in README for socketPath when used with a proxy
- Adding an HTTP test for socketPath option
2018-02-16 17:18:58 -07:00
Evan Shortiss
d07e648c30
Fixing type definitions so AxiosInstance can be invoked
2017-12-20 21:45:48 -08:00
Nick Uraltsev
7133141cb9
Merge pull request #1061 from d-fischer/ts-generic-response
...
Update TypeScript typings with generic type parameters
2017-10-20 07:16:23 -07:00
Nick Uraltsev
26b06391f8
Update links
2017-09-28 21:09:47 -07:00
Daniel Fischer
b0dccc6f16
Updated TypeScript typings with generic type parameters for request methods & AxiosResponse
2017-08-29 20:53:49 +02:00
Julien Roncaglia
07a7b7c84c
Adding a way to disable all proxy processing ( #691 )
...
* Adding a way to disable all proxy processing
When the proxy field in configuration is === false all proxy processing is
disabled. This specifically disable the 'http_proxy' environment variable
handling.
Fixes #635
Related to #434
* Change readme wording
From review comment on PR (#691 )
2017-08-14 13:38:44 +02: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
fa582233af
Merge pull request #828 from mzabriskie/feature/return-last-request-in-redirects
...
Return the last request made in axios response
2017-04-08 11:26:05 -07:00
Jeremy Fowler
188334439f
support node buffers less than 8192 bytes ( #773 )
2017-04-08 13:55:34 +02:00
Rubén Norte
e5beab045c
Adding test checking the request in axios response is the last in a redirect
2017-04-08 12:45:54 +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
3704d57ed4
Removing Promise from axios typings in favor of built-in type declarations
2017-03-14 19:23:05 -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