Closed
Bug 20843
Opened 25 years ago
Closed 23 years ago
Implement caching of HTTP form POST
Categories
(Core :: DOM: Navigation, defect, P3)
Core
DOM: Navigation
Tracking
()
VERIFIED
FIXED
mozilla0.9
People
(Reporter: fur, Assigned: radha)
References
Details
(Keywords: dataloss, perf)
The code for caching of form POST responses is very much the same as for caching responses to HTTP GETs. The only difference is that the form post data must be incorporated into the cache key (along with the POST URL). The nsINetDataCacheManager::GetCachedNetData() method provides a "secondary key" argument for precisely this purpose. The implementation probably goes something like this: 1) Read all data from post-data stream into string buffer 2) Hash string buffer to produce a hashcode, e.g. use MD5 hash 3) Use the hashcode as the secondary cache key 4) If the cache lookup misses, form data will need to be written to the transport stream, so the string produced in step #1 will need to be converted back into a stream using nsIStringStream This technique might not be practical with file upload via multipart/form-data, since the form data can be huge for that case. I'm not sure what we do there - maybe the form upload widget will need to mark the content as not cachable.
Comment 1•25 years ago
|
||
Mass move of all bugs without target milestones to M13.
Reporter | ||
Updated•25 years ago
|
Severity: minor → normal
Bulk move of all Cache (to be deleted component) bugs to new Networking: Cache component.
Comment 3•25 years ago
|
||
Assigning fur's cache bugs to Gordon. He can split them up with davidm.
Updated•25 years ago
|
Target Milestone: M13 → M14
Comment 4•25 years ago
|
||
I think we can get by without this for beta. Moving to M15.
Target Milestone: M14 → M15
Comment 5•24 years ago
|
||
Moving to M17 which is now considered part of beta2.
Target Milestone: M16 → M17
Putting on [nsbeta2+][5/16] radar. This is a feature MUST complete work by 05/16 or we may pull this feature for PR2.
Whiteboard: 3d → [nsbeta2+][5/16]3d
Putting on [nsbeta2-] radar. Missed the Netscape 6 feature train. Please set to MFuture.
Whiteboard: [nsbeta2+][5/16]3d → [nsbeta2-]3d
this might be blocking law for some of his bugs. Nominating.
Keywords: nsbeta3
Comment 10•24 years ago
|
||
does bug 40867 depend on this? bug 39957, which used to depend on bug 40867, was marked as "fixed except for bug 20843".
Comment 11•24 years ago
|
||
cc'ing pollmann and radha as well.
Whiteboard: [nsbeta2-] → [nsbeta2-][nsbeta3-]
Target Milestone: M17 → Future
Comment 12•24 years ago
|
||
Radha, don't we already store the post data stream in session history? It doesn't seem like 40867 would depend on storing the post data stream in session history though - because 40867 says "we shouldn't hit the server again" and if we store the post data stream (which we already do) it sounds like we're planning on hitting the server again...
Assignee | ||
Comment 13•24 years ago
|
||
Session History stores the post data stream for each frame. I'm bit confused by the rest of the comments that Eric made. I let you experts decide.
Comment 14•24 years ago
|
||
:) You can ignore the second part of my comments - senseless rambling... The important point is, I think, that we already do hang on to the data that is sent to the server for a form post.
Assignee | ||
Comment 15•24 years ago
|
||
*** Bug 56346 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 16•24 years ago
|
||
gordon: 56346 has been marked a dupe of this one. Please adjust the Target milestone as per our discussion. Nominating for mozilla 0.9
Keywords: mozilla0.9
Comment 17•24 years ago
|
||
cc self
Comment 18•24 years ago
|
||
This bug seems related to bug 32293, but I'm not quite sure if it's really a dupe. (It seems like that to me, but what do i know.)
Comment 19•24 years ago
|
||
If I can help in any way, let me know. /be
Comment 20•24 years ago
|
||
Bug 56346 (dup of this bug) depended on bug 40867. It seems like this bug should depend on bug 40867, or vice-versa. Cached copies of HTTP POST requests will only be used for session history (going back) and doing things with the current page (view source, save as), right? Copying dataloss and perf keywords from dup bug 56346.
Comment 21•24 years ago
|
||
dataloss => critical
Comment 22•24 years ago
|
||
Marking bug 56436 widens the scope of this bug a lot. From the other bug: <quote> When browsing in session history we should be able to display previous pages without fetching them again from the network, regardless if they are "cachable" or not. Therefore *all* pages should be cached, if not in disk cache, then in memory cache for re-use within the current session when requested by browsing in session history. </quote> More there. I think, the SUMMARY of this bug is thus too narrow.
Comment 23•24 years ago
|
||
Ben, I think it is better to keep the scope of this bug narrow. But I reopened bug 56436 for the other issues.
No longer blocks: 56346
Comment 24•24 years ago
|
||
Bug # in the last 2 comments is wrong. Should be bug 56346.
Comment 25•24 years ago
|
||
<http://www.w3.org/TR/2001/NOTE-cuap-20010206>: 1.10 Allow the user to keep track of completed HTTP POST requests. Users may wish to track and archive HTTP POST requests for the same reasons they wish to track and archive email. For instance, if the user places a book order through a form, and that form uses a POST request, the user should be able to store information about that transaction.
Comment 26•23 years ago
|
||
Radha, I think we're providing everything you need to fix this bug. Let me know if there's any else we can do.
Assignee: gordon → radha
Status: ASSIGNED → NEW
Component: Networking: Cache → History: Session
Assignee | ||
Comment 27•23 years ago
|
||
I think this should be marked fixed. bug 55055 tracks what SH needs to do to use cache for Post results
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Component: History: Session → Document Navigation
QA Contact: tever → docshell
Comment 29•6 years ago
|
||
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b1cccafd336d No bug - Import style changes from Servo PR #20843. r=me
You need to log in
before you can comment on or make changes to this bug.
Description
•