Problem/Motivation

Writing some automated tests to make sure we're hitting the Fast 404 page. You can't discern the fast 404 page from a normally generated 404 page, and so adding a metatag will make life easy.

Steps to reproduce

-Trigger a 404 response
-Tell me with absolute confidence that is the the generated 404 (you can't?)

Proposed resolution

Add a meta tag to the generated 404 HTML.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 add-metatag-to-fast-404-html.patch1.02 KBjnicola

Comments

jnicola created an issue. See original summary.

jnicola’s picture

StatusFileSize
new1.02 KB

Attached is my not terribly graceful patch that modifies Fast404GeneratorSubscriber::onKernelResponse to instead of writing the HTML content all in one line instead takes the response, saves it to a variable, and does a very ungraceful string replace that takes and rewrites it with and the meta tag prior to it.

Now you can discern fast 404 generated HTML from standard HTML with confidence and test against it. Woo. Hoo.

  • pookmish committed cce4497c on 1.0.x
    Issue #3523251 by jnicola: Add meta tag to HTML output to make it...
pookmish’s picture

Status: Active » Fixed

I like this idea. I've committed your patch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.