From 4f1e4ffa4eefcbfc4af310738ce0f59279f9cc94 Mon Sep 17 00:00:00 2001 From: Alex Rickabaugh Date: Thu, 13 Jul 2017 12:28:20 -0700 Subject: [PATCH] fix(common): don't guess Content-Type for FormData bodies (#18104) Fixes #18096 --- packages/common/http/src/request.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/common/http/src/request.ts b/packages/common/http/src/request.ts index 2e55613ff6..7673e71f0e 100644 --- a/packages/common/http/src/request.ts +++ b/packages/common/http/src/request.ts @@ -266,9 +266,9 @@ export class HttpRequest { if (this.body === null) { return null; } - // FormData instances are URL encoded on the wire. + // FormData bodies rely on the browser's content type assignment. if (isFormData(this.body)) { - return 'multipart/form-data'; + return null; } // Blobs usually have their own content type. If it doesn't, then // no type can be inferred.