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

含有%的数据会导致两次解析而后引起数据错误 #32

Open
GoogleCodeExporter opened this issue Jul 28, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

输入:SS%EE
编码后为:SS%25EE
输出:SS�

输入:SS%88EE
编码后为:SS%2588EE
输出:SS�EE

当出现下面的情况会导致数据直接被截断:
输入:321%00123
编码后为:321%2500123
输出:321(后面的字符被截断了)

临时解决办法:
添加数据进队列前如果发现数据中含有%,则先将%替换为%25再
添加进队列,取出来的就是正确的数据了,似乎是因为如果��
�现了%25,会先将%25解析为%,然后又解析了一次,才导致了这
个问题。

具体的代码没仔细研究(不熟悉C),也许是 char *urldecode(char 
*input_str) 函数导致的吧。

Original issue reported on code.google.com by [email protected] on 5 May 2014 at 3:35

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

No branches or pull requests

1 participant