Skip to content

Fix approvals request throwing 400 in IE 11

Eric Eastwood requested to merge 1874-ie-approvers-undefined-json-request into master

What does this MR do?

Fix approvals in MR widget in IE 11

Are there points in the code the reviewer needs to double check?

Using a POST/DELETE with vue-resource will pass an undefined body to the XHR method. In Chrome, it seems to ignore it and not send it through. In IE 11, it seem to send it through as a body and if Rails is parsing JSON, it throws a parsing error.

This pitfall applies everywhere but because we only have some many things written in Vue, and only so many things that send a POST/DELETE without a body, and only so many people using IE, we seem to have only had this one bug reported.

This is a temporary hotfix for an issue users are running into. Here is a general discussion on how we can fix this across the code-base, https://gitlab.com/gitlab-org/gitlab-ce/issues/34534

Why was this MR needed?

Unable to approve/un-approve merge requests in IE 11

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #1874 (closed)

cc @brycepj @jschatz1

Edited by Eric Eastwood

Merge request reports