Skip to content

Gateway in REVA is logging error for upload HEAD requests #11242

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

Open
LukasHirt opened this issue Apr 16, 2025 · 0 comments
Open

Gateway in REVA is logging error for upload HEAD requests #11242

LukasHirt opened this issue Apr 16, 2025 · 0 comments
Labels

Comments

@LukasHirt
Copy link
Contributor

Describe the bug

When starting a TUS upload via Web, the first fired request is a HEAD. This request holds no body nor Content-Size header. In the REVA datagateway, it produces however an error log due to a mismatch between Content-Size header and the size of body of request: ERR content length vs transferred bytes mismatch content-length=52428800000 line=/Users/lukashirt/work/ownCloud/ocis/vendor/github.com/owncloud/reva/v2/internal/http/services/datagateway/datagateway.go:226 pkg=rhttp request-id=e9850097-c8c8-4d07-8078-655bed537acf service=frontend traceid=84dc96563b75bab09e2aab4b4d7847b4 transferred-bytes=0

This is the line that logs it: https://github.com/owncloud/reva/blob/be486343903bbc2acf167a8e8d51e161f921ef7f/internal/http/services/datagateway/datagateway.go#L226

Steps to reproduce

  1. Start an upload

Expected behavior

No error log for the HEAD request.

Actual behavior

Error log is printed.

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

IDM_ADMIN_PASSWORD=admin
OCIS_URL=https://localhost:9200
OCIS_LOG_PRETTY=true
OCIS_LOG_COLOR=true
OCIS_INSECURE=true
PROXY_ENABLE_BASIC_AUTH=true
OCIS_LOG_LEVEL=debug
OCIS_ENABLE_OCM=true
IDM_ADMIN_PASSWORD=admin
OCIS_CORS_ALLOW_ORIGINS="https://localhost:9201,https://localhost:9200"
OCIS_CORS_ALLOW_HEADERS="Origin,Accept,Content-Type,Depth,Authorization,Ocs-Apirequest,If-None-Match,If-Match,Destination,Overwrite,X-Request-Id,X-Requested-With,Tus-Resumable,Tus-Checksum-Algorithm,Upload-Concat,Upload-Length,Upload-Metadata,Upload-Defer-Length,Upload-Expires,Upload-Checksum,Upload-Offset,X-HTTP-Method-Override,cache-control,Accept-Language,Initiator-Id,Referer,Sec-Ch-Ua,Sec-Ch-Ua-Mobile,Sec-Ch-Ua-Platform,User-Agent,Content-Disposition,X-OC-Mtime"
FRONTEND_CONFIGURABLE_NOTIFICATIONS=true
PROXY_CSP_CONFIG_FILE_LOCATION=/Users/lukashirt/.ocis/config/csp.yaml
FRONTEND_ARCHIVER_MAX_SIZE=10000000000
OCIS_CORS_ALLOW_METHODS="PATCH,PUT,GET,PROPFIND,DELETE,OPTIONS,POST"

Additional context

Tested with latest commit on master (20f32d4). I wanted to create this issue in https://github.com/owncloud/reva but since the Issues tab is hidden, I assume they are disabled. Even though visiting https://github.com/owncloud/reva/issues/new displays the form 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

1 participant