-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to preserve timestamps #24669
Comments
@drzraf thanks for the ticket. @guruz @ogoffart @davivel @jvillafanez does the desktop client or mobile client still use the X-OC-MTIME header ? From what I remember its value meant "server has accepted the mtime". It was there for the server to tell the client whenever an external storage does not support the Not sure why, it doesn't seem to make sense now. Maybe it made sense back then. Currently the storage behavior already has a fallback: whenever the storage does not support the Is it time to retire this header ? |
Android client doesn't use it. cc @javiergonzper for iOS client. |
Okay, now I realize that there are two such headers. As input header, when uploading with PUT, the client sets "X-OC-MTIME" to the mtime of the local file. Now as a response header, there's "X-OC-MTIME: Accepted". This is what I meant above about the server accepting the mtime. |
Hmm, somehow it looks like if with GET or HEAD you send a "Last-Modified" header, it means you expect some kind of caching to kick in: https://tools.ietf.org/html/rfc7232#section-2.4 There is no note about PUT, but I could imagine that the semantics could be similar. |
While dating back from 2014 I found the following from @evert insightful: |
True, and we should be doing so in mobile clients. There is a bug open about this, at least in Android repo.
Doesn't seem so.
From: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.29 |
Don't you think that the "send" there refers to the server including the "Last-Modified" header in the response? I think the involved header in the request side is "If-Modified-Since" . https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25 |
Before we used the ETag to identify file changes, we worked a lot with the mtimes and set that using this X-OC-MTime header... |
I thought we used X-OC-MTime mostly to be able to keep the same mtime of files on the client and the server. It wouldn't be useful for the server to show the mtime as the upload time from a user's perspective. So either way we need a way to tell the server what mtime to set to the file. |
@PVince81: exactly. The client used to do a PROPPATCH if the server did no reply with |
So we could at least get rid of the response header "X-OC-MTime: accepted". |
No because the client would error then :-)
|
It's not prohibited either. Last-Modified is an entity header (section 7.1) and an entity is being sent in a PUT request. So the client could add the Last-Modified header for the entity. But I agree that the RFC 2616 does not explicitly specify such usage of the header. |
The solution currently is pass the "X-OC-Mtime" header in the PUT operation of the upload. Since OC 10.0 the web UI also does so. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Following:
mod_unique_id
and refactorOC_Request::getRequestId
#13973 (comment)There are two questions/clarifications here:
The text was updated successfully, but these errors were encountered: