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

Fixing overwrite Blob/File type as Content-Type in browser. #1773

merged 4 commits into from May 28, 2020


Copy link

@Gerhut Gerhut commented Sep 1, 2018

Fix #1643

@emilyemorehouse emilyemorehouse force-pushed the axios:master branch from 6a4a355 to 3f7451c May 30, 2019
Copy link

@yuanyuanyuan yuanyuanyuan left a comment

@Gerhut Gerhut force-pushed the SyaOS:content-type branch from 0070708 to 1b33e70 Jun 24, 2019
@jasonsaayman jasonsaayman linked an issue that may be closed by this pull request May 28, 2020
@jasonsaayman jasonsaayman added this to In progress in v0.20.0 via automation May 28, 2020
@jasonsaayman jasonsaayman added this to the v0.20.0 milestone May 28, 2020
@jasonsaayman jasonsaayman merged commit f3cc053 into axios:master May 28, 2020
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
v0.20.0 automation moved this from In progress to Done May 28, 2020
nikugogoi added a commit to nikugogoi/axios that referenced this pull request Jun 26, 2020
* Add react-hooks-axios to Libraries section of (axios#1925)

* Update - Add Querystring library note (axios#1896)

* Update Querystring libraries note

* Typo in

Co-Authored-By: airs0urce <>

* Update

Co-Authored-By: airs0urce <>

* Add issue templates

* Fixing Mocha tests by locking follow-redirects version to 1.5.10 (axios#1993)

* docs(ECOSYSTEM): add axios-api-versioning (axios#2020)

* Makes Axios error generic to use AxiosResponse (axios#1738)

* Destroy stream on exceeding maxContentLength (fixes axios#1098) (axios#1485)

* Clarify what values responseType can have in Node (axios#2121)

It seems that `responseType: 'blob'` doesn't actually work in Node (when I tried using it, was a string, not a Blob, since Node doesn't have Blobs), so this clarifies that this option should only be used in the browser

* Update - Change `.then` to `.finally` in example code (axios#2090)

* Fixing spacing for (axios#2066)

* Update - Add instructions for installing with yarn (axios#2036)

* Unzip response body only for statuses != 204 (axios#1129)

* Add r2curl in ECOSYSTEM (axios#2141)

* Update - Add Axios Endpoints (axios#2176)

* Add DELETE to list of methods that allow data as a config option (axios#2169)

* Add information about auth parameter to README (axios#2166)

* Update Changelog for release (0.19.0)

* Releasing 0.19.0

* Fix typo in - s/issue/issues (axios#2193)

- issue link is not found.
- typo: issue => issues

* Fix travis CI build (axios#2386)

* Do not modify config.url when using a relative baseURL (resolves axios#1628) (axios#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 axios#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

resolves axios#1628

* Fix a typo in README (axios#2384)

* Fix grammar in (axios#2271)

* Axios create url bug (axios#2290)

* Fix axios#2234 

* added spacing --eslint

* added test cases

* removed unexpected cases after updating the code

* Fixing set `config.method` after mergeConfig for Axios.prototype.request (axios#2383)

Inside Axios.prototype.request function, It's forced to set
method to 'get' after `mergeConfig` if config.method exists, which makes the defaults.method not effective.

* Fixing custom config options (axios#2207)

- fixes axios#2203

* Doc fixes, minor examples cleanup (axios#2198)

* minor fixes

 * simplify language

* ECOSYSTEM: create a few categories

* Examples: log port listening to

* upgrade bootstrap 3 -> 4 in examples

bootstrap 4 is slightly smaller then 3.2.0
so it should also help load examples faster

* categorize 0.19 items a little differently

surface user/consumer changes first

* Update response interceptor docs (axios#2399)

* Fix cancellation error on build master. axios#2290 axios#2207 (axios#2407)

* docs: minor tweak (axios#2404)

made the license section link up to the respective file.

* Sintaxe alternative to send data into the body (axios#2317)

* upadating README: notes on CommonJS autocomplete (axios#2256)

closes axios#2226. add note on how to gain typings / autocomplete / intellisense when using CommonJS (`require()`) imports

* updating spelling and adding link to docs (axios#2212)

* Fixing issue 2195 - order of if/else blocks is causing unit tests mocking XHR. (axios#2201)

* 🐛Fix request finally documentation in README (axios#2189)

* Fixing socket hang up error on node side for slow response. (axios#1752)

* Fixing socket hang up error on node side for slow response.

* eslint check

* Fix word 'sintaxe' to 'syntax' in (axios#2432)

- translate 'sintaxe' word from portuguese to english

* Add toJSON property to AxiosError type (axios#2427)

I noticed the error object has a `toJSON` method but when I tried to use it in my typescript code it complained it didn't exist, even though I was using the `AxiosError` type.

* Make redirection from HTTP to HTTPS work (axios#2426)

When calling an HTTP resource redirecting to a HTTPS one with a keepAlive agent. We get the following error:
TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
    at new ClientRequest (_http_client.js:119:11)
    at Object.request (https.js:281:10)
    at RedirectableRequest._performRequest (/Users/jthomassey/projects/ecom-shop-web/node_modules/follow-redirects/index.js:169:24)
    at RedirectableRequest._processResponse (/Users/jthomassey/projects/ecom-shop-web/node_modules/follow-redirects/index.js:260:10)
    at ClientRequest.RedirectableRequest._onNativeResponse (/Users/jthomassey/projects/ecom-shop-web/node_modules/follow-redirects/index.js:50:10)
    at Object.onceWrapper (events.js:277:13)
    at ClientRequest.emit (events.js:189:13)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
    at Socket.socketOnData (_http_client.js:442:20)

This can be tested here : 
const http = require('http');
const https = require('https');
const axios = require('axios');

axios.get('', { httpAgent: http.Agent({ keepAlive:true }), httpsAgent: https.Agent({ keepAlive:true }) })
  .then(response => {
  .catch(error => {

Axios delegate the redirection to the follow-redirect package which accept an option `agents` for both http and https agent see :

* fix: Fixing subdomain handling on no_proxy (axios#2442)

* Add license badge (axios#2446)

MIT License badge added in file

* Fixing Vulnerability A Fortify Scan finds a critical Cross-Site Scrip… (axios#2451)

* Fixing Vulnerability A Fortify Scan finds a critical Cross-Site Scripting

* use var insted of const

* Add error toJSON example (axios#2466)

* custom timeout prompt copy (axios#2275)

* style: ui

* feat: custom timeout txtx

* feat: custom timeout txtx

* Fixing missing words in docs template (axios#2259)

* Fix to prevent XSS, throw an error when the URL contains a JS script (axios#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

* Update Webpack + deps, remove now unnecessary polyfills (axios#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.

also resolves a few lint issues

* Remove trim util

String.protoype.trim has good coverage (including IE9)

Also, the http adapter already uses the native method.

* Change syntax to see if build passes (axios#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

* Revert "Update Webpack + deps, remove now unnecessary polyfills" (axios#2479)

* Revert "Update Webpack + deps, remove now unnecessary polyfills (axios#2410)"

This reverts commit 189b34c.

* Fix build (axios#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

* Update (axios#2504)

* Adding Typescript HTTP method definition for LINK and UNLINK. (axios#2444)

* Update docs with no_proxy change, issue axios#2484 (axios#2513)

* Document fix (axios#2514)

* Adding options typings (axios#2341)

* Fix XSS logic that matched some valid urls (axios#2529)

* Fix XSS logic that matched some valid urls, e.g. "/one/?foo=bar", when it shouldn't match those

* Fix badge, use master branch (axios#2538)

* Remove dependency on is-buffer (axios#1816)

* Remove dependency on is-buffer from package.json

* Fix CI build failure (axios#2570)

* fixing Travis link (axios#2540)

* Remove 'includes' API, fix CI build failure (axios#2574)

* Remove 'includes' API, fix CI build failure

* fix: fix ignore set withCredentials false (axios#2582)

* Fixing invalid agent issue (axios#1904)

* If this place is false, it will report an error, so you should delete the useless code. (axios#2458)

* Fixing typo in s/Functionallity/Functionality (axios#2639)

* Releasing 0.19.1

* Fix link formatting in to display PR number in parens as link (axios#2643)

* Remove unnecessary XSS check introduced by axios#2451 (axios#2679)

* Remove unnecessary XSS check introduced by axios#2451

* Remove test file of `isValidXss`

* Updating changlog for 0.19.2 release

* Releasing 0.19.2

* Revert `finally` as `then` (axios#2683)

Co-authored-by: Yasu Flores <>

* chore: add `jsdelivr` and `unpkg` support (axios#2443)

* Fix merging of params (axios#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.

* Compatible with follow-redirect aborts the request (axios#2689)

* Compatible with follow-redirect aborts the request

* Use the error code

* Fix tests in browsers (axios#2748)

* Fixing issue for HEAD method and gziped repsonse (axios#2666)

* Fixing unit test failure in Windows OS (axios#2601)

Co-authored-by: Xianming Zhong <>

* Adding jsDelivr link in README (axios#1110)

* Adding jsDelivr link

* Add SRI

* Remove SRI

Co-authored-by: Yasu Flores <>
Co-authored-by: Xianming Zhong <>

* Adding responseEncoding to mergeConfig (axios#1745)

Co-authored-by: Xianming Zhong <>

* Update ' sign to ` in proxy spec (axios#2778)

* Add `onUploadProgress` and `onDownloadProgress` are browser only (axios#2763)

Saw in axios#928 and axios#1966 that `onUploadProgress` and `onDownloadProgress` only work in the browser and was missing that from the README.

Co-authored-by: Xianming Zhong <>

* Added Response header access instructions (axios#1901)

* Added Response header access instructions

* Added note about using bracket notation

* Include axios-hooks in (axios#2003)

* Fixing issue link (axios#2784)

* Add test for redirecting with too large response (axios#2695)

* Add independent `maxBodyLength` option (axios#2781)

* Add independent option to set the maximum size of the request body

* Remove maxBodyLength check

* Update README

* Assert for error code and message

* Adding option to disable automatic decompression (axios#2661)

* Adding ability to disable auto decompression

* Updating decompress documentation in README

* Fixing test\unit\adapters\http.js lint errors

* Adding test for disabling auto decompression

* Removing changes that fixed lint errors in tests

* Removing formating change to unit test

Co-authored-by: Xianming Zhong <>

* Adding tests for method `options` type definitions (axios#1996)

Update tests.

Co-authored-by: Xianming Zhong <>

* Allow PURGE method in typings (axios#2191)

Co-authored-by: Xianming Zhong <>

* Fixing getting local files (file://) failed (axios#2470)

* fix issue axios#2416, axios#2396

* fix Eslint warn

* Modify judgment conditions

* add unit test

* update unit test

* update unit test

* Fixing 'progressEvent' type (axios#2851)

* Fix 'progressEvent' type

* Update axios.ts

* Updating documentation for usage form-data (axios#2805)

Closes axios#2049

Co-authored-by: Xianming Zhong <>

* Update about validateStatus (axios#2912)

Rewrote the comment from "Reject only if the status code is greater than or equal to 500" to "Resolve only if the status code is less than 500"

* Documentation update to clear up ambiguity in code examples (axios#2928)

* Made a adjustment to the documenation to clear up any ambiguity around the use of "fs". This should help clear up that the code examples with "fs" cannot be used on the client side.

Co-authored-by: Jay <>

* Add CDNJS version badge in (axios#878)

This badge will show the version on CDNJS!

Co-authored-by: Jay <>

* Fixing Cookie Helper with Asyc Components (axios#1105) (axios#1107)

Co-authored-by: Jay <>

* Bug/allow header to contain http verb keys axios#1252 (axios#1258)

* Failing test for axios#1252

* Only delete header keys that match an HTTP verb if the value is a non-string

Co-authored-by: David Ko <>
Co-authored-by: Jay <>

* Revert "Bug/allow header to contain http verb keys axios#1252 (axios#1258)" (axios#2977)

This reverts commit 920510b.

* fix 'Network Error' in react native android (axios#1487)

There is a bug in react native Android platform when using get method.  It will trigger a 'Network Error' when passing the requestData which is an empty string to request.send function. So if the  requestData is an empty string we can set it to null as well to fix the bug.

Co-authored-by: Jay <>

* Fixing password encoding with special characters in basic authentication (axios#1492)

* Fixing password encoding with special characters in basic authentication

* Adding test to check if password with non-Latin1 characters pass

Co-authored-by: petr.mares <>
Co-authored-by: Jay <>

* Fixing special char encoding (axios#1671)

* removing @ character from replacement list since it is a reserved character

* Updating buildURL test to not include the @ character

* Removing console logs

Co-authored-by: Jay <>

* Fixing default transformRequest with buffer pools (axios#1511)

* Fixing default transformRequest of TypedArrays with buffer pools

A buffer pool is a large ArrayBuffer of a preset size used with a TypedArray
such as Uint8Array. This can speed up performance when constructing TypedArrays
of unknown sizes, and is a technique used by Node with their Buffers, and
by libraries like dcodeIO/protobuf.js.

Because the ArrayBuffer of such a TypedArray is much longer than the array
itself, using `.buffer` to transform the array before POSTing results in
sending a request with many extraneous empty bytes, which is wastefule and may
result in unexpected behavior.

Using `.slice()` before grabbing the ArrayBuffer fixes the problem by creating
a new TypedArray with a buffer of the expected length.

Signed-off-by: Zac Delventhal <>

* Adding test for using default transformRequest with buffer pools

Adds a new test to the default transformRequest, running it on a
Uint8Array with a byte length of 16, but a much larger ArrayBuffer
with a byte length of 256. The transformed array should not include
any extra bytes, and so must have a byte length of just 16.

Signed-off-by: Zac Delventhal <>

Co-authored-by: Zac Delventhal <>
Co-authored-by: Jay <>

* Include swagger-taxos-codegen in (axios#2162)

Co-authored-by: Jay <>

* Fixing an issue that type 'null' is not assignable to validateStatus (axios#2773)

Co-authored-by: Xianming Zhong <>
Co-authored-by: Jay <>

* Update (axios#2887)

Small change to the data attribute doc of the config. A request body can also be set for DELETE methods but this wasn't mentioned in the documentation (it only mentioned POST, PUT and PATCH). Took my some 10-20 minutes until I realized that I don't need to manipulate the request body with transformRequest in the case of DELETE.

Co-authored-by: Jay <>

* Remove axios.all() and axios.spread() from (axios#2727)

* Updating
- remove axios.all(), axios.spread()

* Updating
- replace example
- axios.all() -> Promise.all()
- axios.spread(function (acct, perms)) -> function (acct, perms)
- add deprecated mark

* Update

Make changes after review

Co-authored-by: Jay <>

* Revert "Fixing default transformRequest with buffer pools (axios#1511)" (axios#2982)

This reverts commit a9a3b5e.

* Fixing overwrite Blob/File type as Content-Type in browser. (axios#1773)

Co-authored-by: Jay <>

* Allow opening examples in Gitpod (axios#1958)

Co-authored-by: Emily Morehouse <>
Co-authored-by: Jay <>

* Include axios-data-unpacker in (axios#2080)

Co-authored-by: Jay <>

* docs(): Detailed config options environment. (axios#2088)

* docs(): Detailed config options environment.

* Update

Co-authored-by: Jay <>

* Adding console log on sandbox server startup (axios#2210)

* Adding console log on sandbox server startup

* Update server.js

Add server error handeling

* Update server.js

Better error message, remove retry.

Co-authored-by: Philippe Recto <>
Co-authored-by: Felipe Martins <>
Co-authored-by: Jay <>

* Add test with Node.js 12 (axios#2860)

* test with Node.js 12

* test with latest

Co-authored-by: Jay <>

* Allow unsetting headers by passing null (axios#382) (axios#1845)

Co-authored-by: Jay <>

* Refactor mergeConfig without utils.deepMerge (axios#2844)

* Adding failing test

* Fixing axios#2587 default custom config persisting

* Adding Concat keys and filter duplicates

* Fixed value from CPE

* update for review feedbacks

* no deepMerge

* only merge between plain objects

* fix rename

* always merge config by mergeConfig

* extract function mergeDeepProperties

* refactor mergeConfig with all keys, and add special logic for validateStatus

* add test for resetting headers

* add lots of tests and fix a bug

* should not inherit `data`

* use simple toString

* revert axios#1845

Co-authored-by: David Tanner <>
Co-authored-by: Justin Beckwith <>

* Replace 'blacklist' with 'blocklist' (axios#3006)

* Add GitHub actions to close invalid issues (axios#3022)

* add close actions

* fix with checkout

* update issue templates

* add reminder

* update close message

* Add GitHub actions to close stale issues/prs (axios#3029)

* prepare stale actions

* update messages

* Add exempt labels and lighten up comments

Co-authored-by: Jay <>

* Update close-issues.yml (axios#3031)

* Update close-issues.yml

Update close message to read better 😄

* Fix use of quotations

Use single quotes as per other .yml files

* Remove user name form message

* Add days and change name to work (axios#3035)

* Fix stale bot config (axios#3049)

* fix stale bot config

* fix multiple lines

* add table of content (preview) (axios#3050)

* add toc (preview)

* remove toc in toc

Signed-off-by: Moni <>

* fix sublinks

* fix indentation

* remove redundant table links

* update caps and indent

* remove axios

Co-authored-by: Moni <>
Co-authored-by: Jay <>

* Adding support for URLSearchParams in node (axios#1900)

* Adding support for URLSearchParams in node

* Remove un-needed code

* Update utils.js

* Make changes as suggested

Co-authored-by: Kamil Posiadala <>
Co-authored-by: Jay <>

Co-authored-by: Cody Chan <>
Co-authored-by: Dmitriy Eroshenko <>
Co-authored-by: Emily Morehouse <>
Co-authored-by: grumblerchester <>
Co-authored-by: Weffe <>
Co-authored-by: Suman Lama <>
Co-authored-by: Gadzhi Gadzhiev <>
Co-authored-by: Tyler Breisacher <>
Co-authored-by: Omar Cai <>
Co-authored-by: Josh McCarty <>
Co-authored-by: Victor Hermes <>
Co-authored-by: drawski <>
Co-authored-by: 유용우 / CX <>
Co-authored-by: Renan <>
Co-authored-by: Daniela Borges Matos de Carvalho <>
Co-authored-by: xlaguna <>
Co-authored-by: Takahiro Ikeda <>
Co-authored-by: Felipe Martins <>
Co-authored-by: multicolaure <>
Co-authored-by: Denis Sikuler <>
Co-authored-by: Michael Foss <>
Co-authored-by: DIO <>
Co-authored-by: bushuai <>
Co-authored-by: Rafael Renan Pacheco <>
Co-authored-by: Avindra Goolcharan <>
Co-authored-by: Sagar Acharya <>
Co-authored-by: James George <>
Co-authored-by: Lucas <>
Co-authored-by: Vamp <>
Co-authored-by: Fabio Aiello <>
Co-authored-by: Joshua Melvin <>
Co-authored-by: Ahmed Tarek <>
Co-authored-by: Ya Hui Liang(Ryou) <>
Co-authored-by: Jihwan Oh <>
Co-authored-by: Tiago Rodrigues <>
Co-authored-by: Jeremie Thomassey <>
Co-authored-by: Maskedman99 <>
Co-authored-by: Wataru <>
Co-authored-by: Yasu Flores <>
Co-authored-by: IVLIU <>
Co-authored-by: Crhistian Ramirez <>
Co-authored-by: Harshit Singh <>
Co-authored-by: Marlon Barcarol <>
Co-authored-by: Luke Policinski <>
Co-authored-by: Angelos Chalaris <>
Co-authored-by: Alanscut <>
Co-authored-by: ZhaoXC <>
Co-authored-by: Michael Shin <>
Co-authored-by: 不才 <>
Co-authored-by: Malik Dirim <>
Co-authored-by: Emily Morehouse <>
Co-authored-by: Xianming Zhong <>
Co-authored-by: JounQin <>
Co-authored-by: Jonathan Sharpe <>
Co-authored-by: Nikita Galkin <>
Co-authored-by: jennynju <>
Co-authored-by: Lukas Drgon <>
Co-authored-by: Thibault Ehrhart <>
Co-authored-by: Jimmy Liao <>
Co-authored-by: Ian Wijma <>
Co-authored-by: Alexandru Ungureanu <>
Co-authored-by: Simone Busoli <>
Co-authored-by: Fonger <>
Co-authored-by: Gustavo López <>
Co-authored-by: Spencer von der Ohe <>
Co-authored-by: Motonori Iwata <>
Co-authored-by: Alan Wang <>
Co-authored-by: Benny Neugebauer <>
Co-authored-by: Remco Haszing <>
Co-authored-by: hexaez <>
Co-authored-by: Jay <>
Co-authored-by: Jay <>
Co-authored-by: Samina Fu <>
Co-authored-by: Ryan Bown <>
Co-authored-by: David Ko <>
Co-authored-by: David Ko <>
Co-authored-by: huangzuizui <>
Co-authored-by: Petr Mares <>
Co-authored-by: petr.mares <>
Co-authored-by: David <>
Co-authored-by: Zac Delventhal <>
Co-authored-by: Zac Delventhal <>
Co-authored-by: Michał Zarach <>
Co-authored-by: Taemin Shin <>
Co-authored-by: marcinx <>
Co-authored-by: Taegyeoung Oh <>
Co-authored-by: George Cheng <>
Co-authored-by: Sven Efftinge <>
Co-authored-by: Anubhav Srivastava <>
Co-authored-by: jeffjing <>
Co-authored-by: Philippe Recto <>
Co-authored-by: Philippe Recto <>
Co-authored-by: Martti Laine <>
Co-authored-by: David Tanner <>
Co-authored-by: Justin Beckwith <>
Co-authored-by: rockcs1992 <>
Co-authored-by: Frostack <>
Co-authored-by: Moni <>
Co-authored-by: Kamil Posiadała <>
Co-authored-by: Kamil Posiadala <>
gwdp added a commit to ikon-integration/axios that referenced this pull request Jul 17, 2020
gwdp added a commit to ikon-integration/axios that referenced this pull request Jul 17, 2020
@Gerhut Gerhut deleted the SyaOS:content-type branch Aug 24, 2020
if (
(utils.isBlob(requestData) || utils.isFile(requestData)) &&
) {
delete requestHeaders['Content-Type']; // Let the browser set it
Comment on lines +21 to +26

This comment has been minimized.


adamdehaven Sep 10, 2020

This breaks allowing the developer to explicitly set the Content-Type header. For example, if I need to send Content-Type of application/octet-stream for a PNG image, the browser overrides this and instead sends image/png.

For a use-case, this breaks sending attachments to the Microsoft Azure Rest API, which requires a Content-Type of application/octet-stream

This comment has been minimized.


Gerhut Sep 10, 2020
Author Contributor

Hi @adamdehaven, thanks for the report.

Although I think this is a breaking change and not sure why this was landed in a minor version (just missed the release version, I think a major version release is OK for this), in your case, I think actually you need to build a blob with type application/octet-stream, which could be done by something like blob = blob.slice(0, blob.size, newType)

Here is a codepen:

This comment has been minimized.


adamdehaven Sep 10, 2020

I'm not sure why I'd need to build a blob instead when this worked fine in v0.19.x?

Why delete the Content-Type value set in the code by the dev? If it's being explicitly set, that value should be respected. Axios should not "decide" which one to use.

This comment has been minimized.


Gerhut Sep 10, 2020
Author Contributor

“Theoretically” speaking, the dev also "set" a content-type in the body if they put a blob in body, which goes after headers and should overwrite the former definition.

Why the body changes header? Because header is used to define the body.

OK, I was just going to remove default content type header for the blob, not thought that there are many users use content type header to overwrite the blob type. I am OK with reverting it now.

This comment has been minimized.


JavierMartinz Sep 29, 2020

Hey @Gerhut, when will #3289 be merged? The solution you mentioned in #1773 (comment) is not working for IE11.

Gerhut added a commit to SyaOS/axios that referenced this pull request Sep 16, 2020
jasonsaayman pushed a commit that referenced this pull request Oct 13, 2020
…1773)" (#3289)

This reverts commit f3cc053.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6 participants