Skip to content

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

Description

@GoogleCodeExporter
输入: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 datou...@gmail.com on 5 May 2014 at 3:35

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions