Skip to content

Truncate mtime passed to X-OC-Mtime in web UI uploads#28050

Closed
PVince81 wants to merge 1 commit intomasterfrom
truncate-upload-mtime
Closed

Truncate mtime passed to X-OC-Mtime in web UI uploads#28050
PVince81 wants to merge 1 commit intomasterfrom
truncate-upload-mtime

Conversation

@PVince81
Copy link
Contributor

Description

Some envs seem to have a higher timer resolution which would cause
a float value to be sent, which isn't supported by the server.

Related Issue

Fixes #27960

Motivation and Context

How Has This Been Tested?

Tested locally with a debugger to see that the mtime still looks good.
But I don't have an env to reproduce the decimal issue to really confirm.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@PVince81
Copy link
Contributor Author

Confirmed working by reporters: #27960

Some envs seem to have a higher timer resolution which would cause
a float value to be sent, which isn't supported by the server.
@DeepDiver1975
Copy link
Member

We should fix this server side as well ..... ?

@PVince81
Copy link
Contributor Author

Yes, see #27960 (comment)

@PVince81
Copy link
Contributor Author

It's done here: #28066

Can we merge this JS only PR ?

@PVince81
Copy link
Contributor Author

PVince81 commented Jul 4, 2017

Can we merge this JS only PR ?

@DeepDiver1975 asking you since you had an objection above

@phil-davis
Copy link
Contributor

#28066 does the truncating at the back-end, and is in master and stable10. So the server will handle being passed finer-resolution timestamps. For the future it might be nicer to do nothing here (or in any client), then it leaves it up to the server to decide what resolution it can (or wants to) apply to timestamps. The server could introduce finer-resolution some day and clients that send more resolution would just start to get it.

@PVince81
Copy link
Contributor Author

PVince81 commented Jul 4, 2017

@phil-davis sounds good. Also some servers like Cernbox seems to have float mtimes from what I saw here owncloud/files_texteditor#172, so let's leave it as is

cc @moscicki

@PVince81 PVince81 closed this Jul 4, 2017
@PVince81 PVince81 deleted the truncate-upload-mtime branch July 4, 2017 16:32
@DeepDiver1975 DeepDiver1975 modified the milestones: 10.1, development Oct 10, 2017
@lock
Copy link

lock bot commented Aug 2, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid text representation: 7

3 participants