SVG images don't show in <img> elements with non-successful http status code

UNCONFIRMED
Unassigned

Status

()

UNCONFIRMED
3 years ago
3 years ago

People

(Reporter: mozilla, Unassigned)

Tracking

({testcase})

38 Branch
x86
Mac OS X
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: gfx-noted)

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20150330004006

Steps to reproduce:

1. Create an <img> element and give a source that returns an image/svg+xml with a non-successful status code (i.e. 1XX, 4XX, 5XX)

Feel free to use https://github.com/jomo/ImgAnyStatus for testing


Actual results:

The image is not displayed and the alt content is displayed instead.
The network inspector shows "Could not load the image".

There is a similar bug in chromium: https://code.google.com/p/chromium/issues/detail?id=464515


Expected results:

I expected the image to show up despite the non-successful HTTP status code.
This does work with other image types.
(Reporter)

Comment 1

3 years ago
Forgot to mention: There was a little bit of discussion about this in bug 276431.

Comment 2

3 years ago
could you attach a self-contained testcase, please.
Component: Untriaged → SVG
Flags: needinfo?(mozilla)
Keywords: testcase-wanted
Product: Firefox → Core
(Reporter)

Comment 3

3 years ago
Created attachment 8588479 [details]
svg_http_status_test.html

Simple HTML page with a few SVG images that return different HTTP Status Codes
Flags: needinfo?(mozilla)
(Reporter)

Updated

3 years ago
Keywords: testcase-wanted

Updated

3 years ago
Keywords: testcase
Component: SVG → ImageLib
Whiteboard: gfx-noted
(Reporter)

Comment 4

3 years ago
Created attachment 8664366 [details]
network inspector showing 0 Size for the images in question

The network inspector (falsely) reports a size of 0 KB for the images that don't load.
Duplicate of this bug: 1210806
You need to log in before you can comment on or make changes to this bug.