fix(ncm): 响应头缓冲 4KB→16KB + set-cookie 提取缓冲 1KB→4KB(真机联调:802 后网易 set-cookie 风暴溢出 ERR_FULL 致登录失败)

This commit is contained in:
MeowOS committed 2026-08-31 08:22:23 +08:00
1 parent 796d022c77
commit 701516db8e
3 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@
extern "C" { extern "C" {
#endif #endif
#define NCM_HTTP_HDR_MAX 4096 #define NCM_HTTP_HDR_MAX 16384 /* M2.82 联调修:网易登录轮询 set-cookie 风暴 >4KB(MUSIC_U 等),原 4096 溢出 ERR_FULL */
#define NCM_CA_PATH_MAX 256 #define NCM_CA_PATH_MAX 256
/* req->verify_ca 三态:1=校验,0=跳过,-1=用全局默认(ncm_http_set_verify_default) */ /* req->verify_ca 三态:1=校验,0=跳过,-1=用全局默认(ncm_http_set_verify_default) */
+1 -1
View File
@@ -111,7 +111,7 @@ int ncm_login_poll(const char *device_id, const char *unikey, const char *cur_co
if (rc != NCM_OK) return rc; if (rc != NCM_OK) return rc;
/* 提取 set-cookie */ /* 提取 set-cookie */
char captured[1024] = ""; char captured[4096] = ""; /* 登录响应 cookie 串较长,1024 易截断 */
ncm_http_parse_set_cookie(resp.headers, resp.headers_len, captured, sizeof captured); ncm_http_parse_set_cookie(resp.headers, resp.headers_len, captured, sizeof captured);
if (captured[0]) r->cookie_was_set = 1; if (captured[0]) r->cookie_was_set = 1;
if (out_cookie) merge_cookie(cur_cookie, captured, out_cookie, out_cookie_sz); if (out_cookie) merge_cookie(cur_cookie, captured, out_cookie, out_cookie_sz);
Binary file not shown.