MCPcopy Create free account
hub / github.com/ZLMediaKit/ZLMediaKit / canAccessPath

Function canAccessPath

src/Http/HttpFileManager.cpp:341–452  ·  view source on GitHub ↗

* 判断http客户端是否有权限访问文件的逻辑步骤 * 1、根据http请求头查找cookie,找到进入步骤3 * 2、根据http url参数查找cookie,如果还是未找到cookie则进入步骤5 * 3、cookie标记是否有权限访问文件,如果有权限,直接返回文件 * 4、cookie中记录的url参数是否跟本次url参数一致,如果一致直接返回客户端错误码 * 5、触发kBroadcastHttpAccess事件 * The logical steps to determine whether the http client has permission to access the file * 1. Find the cookie according to the http request header, find it and enter step 3 * 2.

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

accessFileFunction · 0.85
onAccessPathMethod · 0.85

Calls 12

getUidFromParamsFunction · 0.85
emitHlsPlayedFunction · 0.85
getCookieMethod · 0.80
getHeaderMethod · 0.80
getCookieByUidMethod · 0.80
updateTimeMethod · 0.80
delCookieMethod · 0.80
addCookieMethod · 0.80
urlMethod · 0.45
emptyMethod · 0.45
findMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected