Closed Bug 192524 Opened 23 years ago Closed 23 years ago

FTP support will not reload server-changed files, loads stale cache instead.

Categories

(Core :: Graphics: ImageLib, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: silvaran, Assigned: jdunn)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212 I FTP'd to a server here on my LAN, just using the ftp://username:password@server ... I clicked on a .jpg that was in that directory, and viewed it. Then the .jpg was changed on the server. I hit <reload>, and got the old .jpg (even though it was overwritten on the server). I tried <reload> on the index page, then clicking on it, and got the same thing. I used a command-line FTP tool to retrieve the .jpg instead. It got the new copy. Mozilla seems to be displaying the old .jpg from cache from when I viewed it the first time instead of retrieving the new copy, even when I hit "reload". It's been about 30 minutes or so since I last FTP'd to that server. Nonetheless, when I typed in that ftp:// stuff in the location bar, and clicked on the .jpg, I STILL got the old copy (from Mozilla's cache, the old copy has been overwritten on the server, thus has the same filename on the server). I'd love to see if closing Mozilla/reopening would properly dirty the cache so I'll get the new copy, but then I'd lose this bug report :). Reproducible: Always Steps to Reproduce: 1. FTP to a server using the location bar, username and password (standard FTP port) -- this problem may not depend on location bar usage, or username/password usage, not sure though, this is how I reproduced it. 2. Click on an image file (other types might cause a problem too?) 3. Overwrite the image file on the server with another image, different size, different timestamp, whatever. 4. Try and view the new image file. Actual Results: I got the stale image file -- the one that Mozilla got from the server before it was overwritten with a new one. Expected Results: Given me the new image file (ie: actually retrieved it from the server, ESPECIALLY when I hit reload). Default theme, using the 1.3a RH8 RPMS (xft) right out of the release ftp on mozilla's ftp server. Reasonably stock RH8 installation with few changes. Server is using vsftpd, but as Mozilla is the only FTP client I'm using that seems to have this problem, I suspect it's not server-related. Standard FTP port 21. Login/Password results in an automatic change to the user's home directory on the server side (ie: /home/user). FTP line was ftp://username:password@host -- no trailing slash, NO /home/username or anything, just the line to give me the dir listing.
Closed the browser, and went back to the FTP server. The links were violet (ie: visited), but Mozilla pulled the NEW copy of the .jpg. Note that when I was getting the old file, Mozilla displayed the attributes (size/timestamp) of the NEW file in the reloaded file listing even though it was showing me the old .jpg when I clicked on it. Thanks!
-> imagelib looks like a duplicate of bug 137819, which was fixed, except you are reporting on a newer build. if you have a public example, please provide it in the URL field.
Assignee: dougt → jdunn
Component: Networking: FTP → ImageLib
QA Contact: benc → tpreston
bug 137819 affected file: urls only, not ftp
so we need a different fix?
yeah... that bugfix basically works by stat()ing the file... we can't do that with ftp, I guess.
This appears to be fixed between moz 1.4a & 1.4b. I can reproduce this with 1.3 & 1.4a and NOT with 1.4b. I am assuming that your cache preference Edit->Preferences->Avanced->Cache "Compare the page in the cache to the page on the network:" is set to "Everytime I view the page* Let me know so we can update the bug, if you are still seeing this with a moz 1.4b or new build, then pleasere-describe your scenario.
I can't reproduce the problem with 1.3, nor with 1.4b. If I hit refresh, the new image gets loaded, regardless whether cache is set to "Every time I view the page" or "When the page is out of date". When I click on the image after it's changed, I still get the old image, but reload shows the new image, as is expected. Recommend mark as fixed. Thanks!
Severity: normal → blocker
Blocker? Whoops, I don't know what caused that...
Severity: blocker → normal
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
NOTE: hitting refresh seemed to ALWAYS work for me. I noticed the problem (in 1.3) when I hit back and then reclicked on the link, the wrong (stale cache) image was shown. However, with 1.4b, going back and then reclicking brought up the correct image. Glad it is fixed tho!
You need to log in before you can comment on or make changes to this bug.