Skip to content
New issue

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

iOS JDCache中 formdata上传问题疑问 #5

Closed
huainanzi opened this issue Apr 13, 2023 · 3 comments
Closed

iOS JDCache中 formdata上传问题疑问 #5

huainanzi opened this issue Apr 13, 2023 · 3 comments

Comments

@huainanzi
Copy link

截屏2023-04-13 14 58 25
在使用JDCache中,post请求上传blob数据,hook后由native处理,这里的url遇到图中这种需要拼接的时候,代码中是webView.URL.absoluteString去除query,然后拼接上params中传过来的url,我们这里实践发现会多出来webView.URL.absoluteString中的path部分,这里为什么不是webView.URL.absoluteString中的域名直接拼接params中传过来的url
请教下,这里是大佬业务特性还是这里有不足

@wallllllace
Copy link
Collaborator

这个是我们最初的业务特性保留下来的代码,现在这个逻辑应该不需要了,因为拦截http/https的情况下,传过来的URL不应该不带scheme

@huainanzi
Copy link
Author

我们实践发现,现在传过来的URL就是不带scheme,这是bug吗或者说不带scheme的url如何拼接处理能通用

@wallllllace
Copy link
Collaborator

业务应该保证传过来的URL是完整的,不然的话JDCache也无法知道该怎么拼接正确的URL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants