[cvs] commit: framework/Browser Browser.php
    Michael M Slusarz 
    slusarz at bigworm.colorado.edu
       
    Tue Apr 27 11:02:17 PDT 2004
    
    
  
slusarz     2004/04/27 11:02:17 PDT
  Modified files:
    Browser              Browser.php 
  Log:
  Finally found the problem for why images (i.e. jpegs) were not being displayed
  correctly.
  
  Mozilla appears to be returning differnet HTTP_ACCEPT strings for the two
  different page accesses it takes to load an image.
  page load 1 = loading the HTML/JS code to resize the image window
  page load 2 = the actual loading of the image
  
  For page load 1, the HTTP_ACCEPT params were:
  application/x-shockwave-flash,text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1
  
  But, for page load 2, the params were:
  image/png,*/*;q=0.5
  
  So it appears that Mozilla sends different ACCEPT params when handlng <img>
  links than other links.  It appears the goal is to prefer PNG images over
  other kinds of images.
  
  The problem, from our point of view, was that there was a typo in a
  strstr() call (whoops) that was causing the */* to be ignored.  However, for
  images, we still can't trust the browser when it says it can handle all images
  because the reality is, it can't.  So we need to change the code around to
  still do an explicit image type check if the mimetype only matches the
  wildcard string '*/*'.
  
  Revision  Changes    Path
  1.129     +29 -42    framework/Browser/Browser.php
  Chora Links:
  http://cvs.horde.org/diff.php/framework/Browser/Browser.php?r1=1.128&r2=1.129&ty=u
    
    
More information about the cvs
mailing list