-
Couldn't load subscription status.
- Fork 6.4k
Description
Head request on existing folder in root of a bucket returns 404.
While it shall return 200 or may be other code that confirms existence of a folder.
Bucket rights are rw/public.
I use django-minio-storage with Django
and try to subsitute S3 for local testing.
Our existing code fails with issue caused by above.
I debugged an digged and found that minio returns 404 error code
where it shall return OK code.
Internally it tries to do "stat" on folder
static.bucket/admin
My debug dump from inside of _url_open method
looks like this.
Response NOT success. Status = 404 target url = http://localhost:9000/static.bucket/admin. Headers: {'x-amz-content-sha256': u'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'host': u'localhost:9000', 'authorization': 'AWS4-HMAC-SHA256 Credential=username/20170526/us-east-1/s3/aws4_request, SignedHeaders=host;user-agent;x-amz-content-sha256;x-amz-date, Signature=80cd2514bb98232cbcd13ae2cd5f70ada296e16b2ddd1ad894c587a5db80245a', 'x-amz-date': '20170526T003958Z', 'user-agent': 'Minio (Linux; x86_64) minio-py/2.2.2'}
Raising exception with method HEAD
Expected Behavior
It shall return 200 code
Current Behavior
It returns 404 status code
Possible Solution
I think Head request for folder is not properly implemented and there is no proper test case for it.
I'm not absolutely sure, but that's what I think.
Steps to Reproduce (for bugs)
Create bucket
Create folder with subfolders and files
Send head request for a folder as in example above.
it shall fail with returning 404 like folder does not exist.
However, folder exists and return code shall be different.
I think what I described above is easier than replicating my setup with
Django and django-minio-storage
1.
2.
3.
4.
Context
Replace S3 with Minio for local testing with Django project.
Probably, one of popular uses for Minio if it would work.
Your Environment
-
Version used (
minio version):
Latest downloaded at minio site link few days ago.
Version: 2017-05-05T01:14:51Z
Release-Tag: RELEASE.2017-05-05T01-14-51Z
Commit-ID: 40985cc -
Environment name and version (e.g. nginx 1.9.1):
Ubuntu 14.04 x86_64 -
Server type and version:
Vagrant VM -
Operating System and version (
uname -a):
Linux localdev 3.13.0-119-generic Skip policy files #166-Ubuntu SMP Wed May 3 12:18:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux -
Link to your project: