Added another MIME type for directory detection #5

Merged
merged 2 commits into from Oct 18, 2012

Conversation

Projects
None yet
2 participants
Contributor

SecurityForUs commented Oct 18, 2012

Per OpenStack documents here: http://docs.openstack.org/trunk/openstack-object-storage/developer/content/pseudo-hierarchical-folders-directories.html

To take advantage of this feature, the directory marker objects must also be created to represent the appropriate directories. The following additional objects need to be created. A good convention would be to create these as zero- or one-byte files with a Content-Type of application/directory.

I left in the original MIME type for backwards-compatibility, but "application/directory" is the standard, and it's also how it's shown via the OpenStorage control panel.

Contributor

CrackerJackMack commented Oct 18, 2012

Good catch! I reviewed the merge and it appears that the appropriate mime-type is used when creating directories, just not in the is_dir() function. If you could fix the doc block along with it, I will merge this ASAP.

Contributor

SecurityForUs commented Oct 18, 2012

Per your request I fixed the doc page and I also modified the comment block in the function as well.

CrackerJackMack added a commit that referenced this pull request Oct 18, 2012

Merge pull request #5 from SecurityForUs/content_type-fix
is_dir() now appropriately detects both directory mime types.

@CrackerJackMack CrackerJackMack merged commit 076fdb9 into softlayer:master Oct 18, 2012

Contributor

CrackerJackMack commented Oct 18, 2012

Perfect thanks! Wanted to be sure you got credit for the whole fix.

CrackerJackMack added a commit that referenced this pull request Nov 3, 2012

Merge pull request #5 from SecurityForUs/content_type-fix
is_dir() now appropriately detects both directory mime types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment