Skip to content
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

GET a file while it's in processing doesn't return 425 code (async uploads) #5326

Closed
saw-jan opened this issue Jan 4, 2023 · 2 comments
Closed
Assignees
Labels

Comments

@saw-jan
Copy link
Member

saw-jan commented Jan 4, 2023

Steps to reproduce

  1. Start oCIS with these envvars:
PROXY_ENABLE_BASIC_AUTH=true \
STORAGE_USERS_OCIS_ASYNC_UPLOADS=true \
OCIS_EVENTS_ENABLE_TLS=false \
POSTPROCESSING_DELAY=30s \
./bin/ocis server
  1. Upload a file
curl -XPUT "https://localhost:9200/remote.php/dav/files/admin/lorem.txt" \
-d"uploaded" -uadmin:admin -vk
  1. Try to GET the file using old, new and spaces endpoints

Old

curl -XGET "https://localhost:9200/remote.php/webdav/lorem.txt" -uadmin:admin -vk

New

curl -XGET "https://localhost:9200/remote.php/dav/files/admin/lorem.txt" -uadmin:admin -vk

Spaces

curl -XGET "https://localhost:9200/dav/spaces/5c3aacd7-e23d-43b0-89ec-ca4c67ae02ef%24cae6d2cf-a0dc-4e1a-8354-20b74ef12f34/lorem.txt" \
-uadmin:admin -vk

Expected behavior

to return status code 425 as mentioned in #4095 (comment)

Actual behavior

returns 500 internal server error

< HTTP/1.1 500 Internal Server Error
< Access-Control-Allow-Origin: *
< Content-Length: 0
< Content-Security-Policy: default-src 'none';
< Date: Wed, 04 Jan 2023 11:25:41 GMT
< Vary: Origin
< X-Content-Type-Options: nosniff
< X-Download-Options: noopen
< X-Frame-Options: SAMEORIGIN
< X-Permitted-Cross-Domain-Policies: none
< X-Robots-Tag: none
< X-Xss-Protection: 1; mode=block
< 
* Connection #0 to host localhost left intact

Setup

oCIS: built from master branch

@saw-jan saw-jan changed the title a GET request to uploaded file while it's in processing doesn't return 425 status code (async uploads) GET to uploaded file while it's in processing doesn't return 425 code (async uploads) Jan 4, 2023
@saw-jan saw-jan changed the title GET to uploaded file while it's in processing doesn't return 425 code (async uploads) GET a file while it's in processing doesn't return 425 code (async uploads) Jan 4, 2023
@kobergj kobergj self-assigned this Jan 5, 2023
@kobergj
Copy link
Collaborator

kobergj commented Mar 9, 2023

fix landed

@kobergj kobergj closed this as completed Mar 9, 2023
@saw-jan
Copy link
Member Author

saw-jan commented Mar 10, 2023

Confirmed:
old dav: curl -XGET "https://localhost:9200/remote.php/webdav/lorem.txt" -uadmin:admin -vk
new dav: curl -XGET "https://localhost:9200/remote.php/dav/files/admin/lorem.txt" -uadmin:admin -vk
spaces dav: curl -XGET "https://localhost:9200/dav/spaces/17f05810-47dc-4442-84f7-6e4fc4ad59c5\$0dec08c6-65a4-4d29-b2e3-d63e1a613a4e/lorem.txt" -uadmin:admin -vk

Response:

< HTTP/1.1 425 Too Early
< Access-Control-Allow-Origin: *
< Content-Length: 0
< Content-Security-Policy: default-src 'none';
< Date: Fri, 10 Mar 2023 04:02:15 GMT
< X-Content-Type-Options: nosniff
< X-Download-Options: noopen
< X-Frame-Options: SAMEORIGIN
< X-Permitted-Cross-Domain-Policies: none
< X-Robots-Tag: none
< X-Xss-Protection: 1; mode=block

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

No branches or pull requests

2 participants