Skip to content

Return headers from 404 fetch (except status/statusText)

Gonzalo Servat requested to merge fix-review-app-404 into master

Why is this change being made?

Previously when a request was made for a page that didn't exist, we were fetching the 404 page (404.html) but using the headers from the original request, which means the content was HTML but the headers were from the original response from GCS (which includes content-type: application/xml). This means that for a 404, we'd see a page like this:

image

It was HTML content but the content-type said application/xml.

This MR fixes that by using the headers from the 404.html fetch except for the status + status text.

This issue only affects the review app and not about.gitlab.com

Author Checklist

  • Provided a concise title for this Merge Request (MR)
  • Added a description to this MR explaining the reasons for the proposed change, per say why, not just what
    • Copy/paste the Slack conversation to document it for later, or upload screenshots. Verify that no confidential data is added, and the content is SAFE
  • Assign reviewers for this MR to the correct Directly Responsible Individual/s (DRI)
    • If the DRI for the page/s being updated isn’t immediately clear, then assign it to one of the people listed in the Maintained by section on the page being edited
    • If your manager does not have merge rights, please ask someone to merge it AFTER it has been approved by your manager in #mr-buddies
    • The when to get approval handbook section explains the workflow in more detail
  • If the changes affect team members, or warrant an announcement in another way, please consider posting an update in #whats-happening-at-gitlab linking to this MR
    • If this is a change that directly impacts the majority of global team members, it should be a candidate for #company-fyi. Please work with internal communications and check the handbook for examples.

Edited by Gonzalo Servat

Merge request reports

Loading