Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

http URL不兼容问题,估计是代码小bug #203

Closed
android0276 opened this issue Sep 30, 2018 · 15 comments
Closed

http URL不兼容问题,估计是代码小bug #203

android0276 opened this issue Sep 30, 2018 · 15 comments

Comments

@android0276
Copy link

http://xxxx.com/preview/iframe?id=xxx&cache=|
该域名规则为直连,出错的原因关键在于 cache=| ,这里不是数字1,是符号| , 这会导致直接没法发送请求,请求日志里面也没有任何信息,但是surge和charles是没有此问题的,麻烦作者看一下。

@android0276
Copy link
Author

作者你可以用这个链接做测试 http://alibaba-inc.com/preview/iframe?id=303714&cache=|

@zhuhaow
Copy link
Owner

zhuhaow commented Sep 30, 2018

这确实是个bug,之前baidu好像也有过,原因是url是不允许出现|的。所以并不是这里的bug。

另外,这个东西之前修复过,至于为什么还有问题,你可以研究下 https://github.com/zhuhaow/NEKit/blob/master/src/Utils/HTTPURL.swift 里的逻辑哪里写错了,我最近没有时间。

@android0276
Copy link
Author

cache=| 做URLencode cache=%7c就可以

@android0276
Copy link
Author

好的,感谢

@zhuhaow
Copy link
Owner

zhuhaow commented Sep 30, 2018

感觉好像是另外一个地方的bug,有点奇怪,我修复了一下。不过懒得发新的Specht了,CI里的证书过期了。

@android0276
Copy link
Author

你就修复下Nekit就行

@zhuhaow
Copy link
Owner

zhuhaow commented Sep 30, 2018

我是无法访问阿里内网的,所以这个链接我测试不了,你自己试试。

@zhuhaow
Copy link
Owner

zhuhaow commented Sep 30, 2018

好了

@zhuhaow zhuhaow closed this as completed Sep 30, 2018
@zhuhaow
Copy link
Owner

zhuhaow commented Sep 30, 2018

这个bug只有在domain有-并且没有用https的情况下会触发。我这么多年用下来没发现过问题。充分体现了阿里安全建设的落后……

@zhuhaow
Copy link
Owner

zhuhaow commented Sep 30, 2018

这个我理解,自己内部的东西基本都是http。但是一般上了 alibaba-inc.com 我感觉就比较正规了,应当直接全站默认 https reverse proxy 的

@android0276
Copy link
Author

这个复杂吗

@zhuhaow
Copy link
Owner

zhuhaow commented Sep 30, 2018

打不出来,或者你强行改代码,在HTTPProxySocket里面加上log。
要么就接一层 Charles

@android0276
Copy link
Author

嗯,懂

@zhuhaow
Copy link
Owner

zhuhaow commented Sep 30, 2018 via email

@zhuhaow
Copy link
Owner

zhuhaow commented Sep 30, 2018

你是完全用potatso的代码接管了所有packet然后发出去了?那就要大改了。

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

No branches or pull requests

2 participants