def do_MKCOL(self, environ, start_response):
path = environ["<STR_LIT>"]<EOL>provider = self._davProvider<EOL>if util.get_content_length(environ) != <NUM_LIT:0>:<EOL><INDENT>self._fail(<EOL>HTTP_MEDIATYPE_NOT_SUPPORTED,<EOL>"<STR_LIT>",<EOL>)<EOL><DEDENT>if environ.setdefault("<STR_LIT>", "<STR_LIT:0>") != "<STR_LIT:0>":<EOL><INDENT>self._fail(HTTP_BAD_REQUEST, "<STR_LIT>")<EOL><DEDENT>if provider.exists(path, environ):<EOL><INDENT>self._fail(<EOL>HTTP_METHOD_NOT_ALLOWED,<EOL>"<STR_LIT>",<EOL>)<EOL><DEDENT>parentRes = provider.get_resource_inst(util.get_uri_parent(path), environ)<EOL>if not parentRes or not parentRes.is_collection:<EOL><INDENT>self._fail(HTTP_CONFLICT, "<STR_LIT>")<EOL><DEDENT>self._check_write_permission(parentRes, "<STR_LIT:0>", environ)<EOL>parentRes.create_collection(util.get_uri_name(path))<EOL>return util.send_status_response(environ, start_response, HTTP_CREATED)<EOL>
Handle MKCOL request to create a new collection.

        @see http://www.webdav.org/specs/rfc4918.html#METHOD_MKCOL