replyParser had a bug where, when a base64 address ended with '==', the key-value pairs would break. I worked around the issue by switching '==' it with a non-base64 character before the split, and back after.

This commit is contained in:
idk
2018-03-06 04:46:05 -05:00
parent 622c39b6a5
commit 32386886bc

View File

@ -50,7 +50,8 @@ func parseReply(line string) (*Reply, error) {
}
for _, v := range parts[2:] {
kvPair := strings.Split(v, "=")
kvPair := strings.Split(strings.Replace(v, "==", "%", -1), "=")
kvPair[1] = strings.Replace(kvPair[1], "%", "==", -1)
if len(kvPair) != 2 {
return nil, fmt.Errorf("Malformed key-value-pair.\n%s\n", kvPair)
}