Skip to content

WebDAV Upload from macOS doesn't work #1492

Closed
opencloud-eu/reva
#354

Description

@dh1tw

Describe the bug

Hi, I mounted my personal space in MacOS Finder as a WebDAV share. I can see all files in my personal space. Uploading files via WebDAV creates the files with a size of 0 bytes. After a moment, with Error -36. Uploading the files through the web browser works flawlessly.

Steps to reproduce

  1. Mount Personal Space as WebDAV on macOS
  2. Drag & Drop a file into the mounted space
  3. Wait until error appears (~1min)

Expected behavior

Files should be uploaded correctly via WebDAV.

Actual behavior

MacOS Finder errors with the following error (sorry my system is in German):

Der Finder konnte diesen Vorgang nicht abschließen, da einige Daten in „mypicture.png“ nicht gelesen oder geschrieben werden konnten.
(Fehler: -36)

Setup

Docker Compose
Container Image: OpenCloud-rolling:3.4.0

Additional context

MacOS 15.6.1

Activity

  1. micbar commented on Sep 22, 2025

    @micbar
    Member

    I could reproduce the problem.

    Seems like a MacOS issue. Mac doesn't seem to send the content length.

    @butonic @aduffeck I think there is not much we can do.

    {"level":"error","service":"ocdav","name":"eu.opencloud.web.ocdav","traceid":"84f57a52715cc1960fe573694311a31c","request-id":"5f7dbc3c2951/ANM47M0yxW-088240","spaceid":"be19e592-c239-4a0e-b41d-ec1009b2f702$fe26774e-e62b-103f-91be-0575585b6b72","path":"/pexels-dreamypixel-547119 Kopie.jpg","error":"strconv.ParseInt: parsing \"\": invalid syntax","time":"2025-09-22T07:05:04Z","line":"github.com/opencloud-eu/reva/[email protected]/internal/http/services/owncloud/ocdav/put.go:147","message":"error getting the content length"}
    {"level":"info","service":"proxy","proto":"HTTP/1.1","request-id":"5f7dbc3c2951/ANM47M0yxW-088239","traceid":"84f57a52715cc1960fe573694311a31c","remote-addr":"89.246.102.70","method":"PUT","status":400,"path":"/remote.php/dav/spaces/be19e592-c239-4a0e-b41d-ec1009b2f702$fe26774e-e62b-103f-91be-0575585b6b72/pexels-dreamypixel-547119 Kopie.jpg","duration":285.658045,"bytes":0,"time":"2025-09-22T07:05:04Z","line":"github.com/opencloud-eu/opencloud/services/proxy/pkg/middleware/accesslog.go:34","message":"access-log"}
  2. micbar commented on Sep 22, 2025

    @micbar
    Member

    @dh1tw I admit that is frustrating. I did a quick research, mac does't fulfil the RFC standard here. The RFC states that the content length header is mandatory on WebDAV PUT requests.

  3. rhafer commented on Sep 22, 2025

    @rhafer
    Member

    @micbar Can you check the Transfer-Encoding Header that the MacOS machine it settting in the PUT request? Does it contain chunked by chance? In that case the Content-Length can be absent. (However, it seems reva doesn't currently support the chunked transfer-encoding)

  4. micbar commented on Sep 22, 2025

    @micbar
    Member

    @rhafer There has already been some code in reva. Very interesting. 🤣

    I like the speaking function names:

        if sufferMacOSFinder(r) {
    		err := handleMacOSFinder(w, r)
    		if err != nil {
    			log.Debug().Err(err).Msg("error handling Mac OS corner-case")
    			w.WriteHeader(http.StatusInternalServerError)
    			return false
    		}
    	}
    	return true
  5. moved this from Qualification to Done in OpenCloud Team Boardon Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions