Closed Bug 103726 Opened 24 years ago Closed 24 years ago

FTP directory listings not reflecting file changes on reload

Categories

(Core Graveyard :: Networking: FTP, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: cwhitman, Assigned: bbaetz)

Details

(Keywords: testcase)

Attachments

(1 file, 1 obsolete file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.4) Gecko/20010913 BuildID: 2001091303 With the FTP directory listings showing in HTML mode, hitting the reload button will not reflect changes in the directory structure. I have tried both the Win32 version and the Linux version, and they both exhibit this behavior. Even closing and re-opening the browser will not necessarily make changes show up; apparently, the directory must first expire from the cache, which doesn't take long for FTP files. Reproducible: Always Steps to Reproduce: 1. With Mozilla, view an FTP directory which you have the ability (by whatever means) to add to or subtract from. 2. Add a file to (or take one away from) the directory that you have displayed in Mozilla. 3. Hit reload on the browser. The changes will not be reflected. Actual Results: New files will not be diplayed. Deleted files will still be present. Expected Results: It should have re-queried the FTP server, showing a new directory listing. This did not happen in the 0.9.2 version of Mozilla, but only since I upgraded to 0.9.4 (I skipped over 0.9.3). In fact, 0.9.2 reloaded the directory from the server every time you changed levels. Perhaps this was too much, but it would be preferable to not reloading the directory even when specifically ordered to do so.
The cache is 15 minutes, IIRC. Unlike http, theres no easy way to do a conditional request. Shift-reloading should force a reload. Perhaps a normal reload should always refetch, too. darin?
yes, i think a normal reload should hit the server. that would be consistent with LOAD_NORMAL|VALIDATE_ALWAYS. since ftp can't validate, it must refetch.
OK, then. ->0.9.6, and confirming
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → mozilla0.9.6
I'm going to attach a patch, which sets us to not read from the cache for VALIDATE_ALWAYS | LOAD_BYPASS_CACHE darin: Is that all I need to test? I'm not sure how ftp should handle some of the const in nsIRequest.idl.
Attached patch patch (obsolete) — Splinter Review
for ftp, i think the following makes sense: LOAD_FROM_CACHE : always use cache entry, even if expired LOAD_BYPASS_CACHE : overwrite cache entry LOAD_NORMAL|VALIDATE_ALWAYS : overwrite cache entry LOAD_NORMAL : honor expiration time LOAD_NORMAL|VALIDATE_ONCE_PER_SESSION : overwrite cache entry if first access this session, otherwise use cache entry even if expired. LOAD_NORMAL|VALIDATE_NEVER : always use cache entry, even if expired
"overwrite cache entry if first access this session, otherwise use cache entry even if expired." How do I do this? The http code has the comment for this flag: // If the cached response does not include expiration infor- // mation, then we must validate the response, despite whether // or not this is the first access this session. This behavior // is consistent with existing browsers and is generally expected // by web authors. which doesn't help ftp.
currently, ftp makes up an expiration time, i thought. so, if you like my interpretation of the load flags, then you could call nsICacheSession::SetDoomEntriesIfExpired(PR_FALSE), and compare the expiration time to the current time yourself. this flag is by default set to true.
Out of time, -> 0.9.7
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Missed 0.9.7, ->0.9.9
Target Milestone: mozilla0.9.7 → mozilla0.9.9
only nsbeta1+ bugs can have milestones, resetting to ---
Target Milestone: mozilla0.9.9 → ---
Target Milestone: --- → mozilla0.9.9
Attached patch real patchSplinter Review
Oops, forgot to diff+attach this earlier
Attachment #53894 - Attachment is obsolete: true
Comment on attachment 69334 [details] [diff] [review] real patch >+PRUint32 nsFtpState::mSessionStartTime = NowInSeconds(); do we need to worry about any problems related to initialization of static variables? not that i can think of a case where it would be a problem, but it seems to be a pattern that we avoid. one good alternative is to put a getter for this on FTP protocol handler class. sr=darin
Attachment #69334 - Flags: superreview+
Comment on attachment 69334 [details] [diff] [review] real patch what darin said.
Attachment #69334 - Flags: superreview+ → review+
Comment on attachment 69334 [details] [diff] [review] real patch No, POD types are OK to init at a file level Restoring sr flag cause of uncaught midair.
Attachment #69334 - Flags: superreview+
if you know for certain that none of our platforms will have trouble with this (eg. you've seen existing code in the tree that follows this pattern), then i'm ok with it.
Yeah, and I checked on #mozilla too. Checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
VERIFIED: 1.0 RC1, Win98 .
Keywords: testcase
fixing state
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: