Skip to content

HttpClient fails to parse an empty 200 response in IE11 #18680

@alexeykostevich

Description

@alexeykostevich

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

The HttpClient throws an error "Http failure during parsing for ..." in the case of an empty 200 response in IE11.
The issue is not reproducible in Chrome and Firefox.
Setting a responseType option to "text" helps to resolve the issue.

Expected behavior

IE11 returns null by analogue with other browsers.

Minimal reproduction of the problem with instructions

Make an HttpClient.get request to an endpoint with the an empty file in IE11.
See this plunker for an example.

What is the motivation / use case for changing the behavior?

It is expected to have a consistent behavior across all browsers.

Environment

Angular version: 4.3.4

Browser:

  • Chrome (desktop) version XX
  • Chrome (Android) version XX
  • Chrome (iOS) version XX
  • Firefox version XX
  • Safari (desktop) version XX
  • Safari (iOS) version XX
  • IE version 11
  • Edge version XX

For Tooling issues:

  • Node version: 6.10
  • Platform: Windows

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions