def check_path_header(req, name, length, error_msg):
    src_header = unquote(req.headers.get(name))
    if not src_header.startswith('/'):
        src_header = '/' + src_header
    try:
        return utils.split_path(src_header, length, length, True)
    except ValueError:
        raise HTTPPreconditionFailed(
            request=req,
            body=error_msg)
Validate that the value of path-like header is
dataset/ETHPy150Open openstack/swift/swift/common/constraints.py/check_path_header