Closed Bug 78015 Opened 23 years ago Closed 23 years ago

IMG with no SRC attribute is still fetched from the server

Categories

(Core :: Graphics: ImageLib, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: jrgmorrison, Assigned: pavlov)

References

()

Details

(Keywords: perf)

Attachments

(2 files)

I was going through server logs to confirm darin's fix for the
charset/cache/VALIDATE_ALWAYS bug (bug 77269), and noticed that 
a _directory_ URL was being fetched on every cycle through the 
zdnet test pages. 

Anyways, it came down to this bug-report-test-case-in-one ....
  http://jrgm/bugs/img-without-src/test.html


<html>
<body>
<p>
  This page contains an IMG that has no SRC attribute.  Mozilla still
  tries to fetch it from the server, at a URL of "./" (i.e., the current
  relative path).  If there is an 'index.html' for that directory, then
  it fetches that entire document, 200 OK on every load of this document.
</p>
 
  <IMG alt="image-with-no-src-attribute" height=100 width=100>
 
</body>
</html>
I imagine this is a simple check and bail, so decorating with ominous keywords ...

(side note: we shouldn't even display the ALT text if the element is this
mailformed; the image should be considered to not exist, IMHO).
Keywords: mozilla0.9.1, perf
Oh, yeah. To check, log into jrgm and do 'tail -f /etc/httpd/logs/access_log', 
and load/reload the page. Notice the 60KB document that comes along on every 
load/reload. 
0.9.1
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.1
patch attached.  need r= and sr=
Keywords: patch
r=jag if you use !src.IsEmpty() instead of src.Length() > 0
sr=hyatt
Attached patch better patchSplinter Review
here is a new patch.. this one removes all of the ifdef USE_IMG2 stuff, moves 
image loading into its own function that does all of the checks, etc and loads 
as to reduce having the same code in numerous places.  this also has a fix for 
bug 69070 in it as well.
Blocks: 78690
Priority: -- → P1
r=saari.

need new sr=
sr=hyatt
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Blocks: 71668
Status: RESOLVED → VERIFIED
Verified fix checked into lxr.mozilla.org
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: