We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题点,http_interceptor.c,266行: 参数1:interceptor->connect_params,重定向为新的URL数据 参数2:http_get_connect_params_url(interceptor->connect_params,重定向为新的URL数据同一个地址 http_url_parsing(interceptor->connect_params, http_get_connect_params_url(interceptor->connect_params)); 解决办法: 新的的URL数据重新申请内存保存数据作为参数2传入完成URL的重新解析 const char *p_new_url = NULL; int malloc_len = strlen(http_get_connect_params_url(interceptor->connect_params))+1; p_new_url =(const char *)platform_memory_alloc(http_get_connect_params_url(malloc_len); if(!p_new_url ) { return; } memset(p_new_url,0,); memcpy(p_new_url,http_get_connect_params_url(interceptor->connect_params),strlen(http_get_connect_params_url(interceptor->connect_params)); ret = http_url_parsing(interceptor->connect_params, p_new_url); //这里原来的地址重新申请的时候以及被释放了,所以这里需要拷贝一个新的地址处理 platform_memory_free(p_new_url);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题点,http_interceptor.c,266行:
参数1:interceptor->connect_params,重定向为新的URL数据
参数2:http_get_connect_params_url(interceptor->connect_params,重定向为新的URL数据同一个地址
http_url_parsing(interceptor->connect_params, http_get_connect_params_url(interceptor->connect_params));
解决办法:
新的的URL数据重新申请内存保存数据作为参数2传入完成URL的重新解析
const char *p_new_url = NULL;
int malloc_len = strlen(http_get_connect_params_url(interceptor->connect_params))+1;
p_new_url =(const char *)platform_memory_alloc(http_get_connect_params_url(malloc_len);
if(!p_new_url ) {
return;
}
memset(p_new_url,0,);
memcpy(p_new_url,http_get_connect_params_url(interceptor->connect_params),strlen(http_get_connect_params_url(interceptor->connect_params));
ret = http_url_parsing(interceptor->connect_params, p_new_url); //这里原来的地址重新申请的时候以及被释放了,所以这里需要拷贝一个新的地址处理
platform_memory_free(p_new_url);
The text was updated successfully, but these errors were encountered: