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)

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 well formatted .