On Sat, Aug 20, 2005 at 12:32:52PM -0400, Yaron Minsky wrote: > > I'm not the best at reading ocaml, but it doesn't seem that your code > > will handle arbitrary %-escaping elsewhere in <some string>. The HTTP > > spec allows any character to be escaped. Some clients (like libcurl) > > are a little more agressive about escaping. For example, the actual > > stream that is sent from curl during the HTTP POST begins: > > > > > > keytext%3D%2D%2D%2D%2D%2DBEGIN%20PGP%20PUBLIC%20KEY%20BLOCK%2D%2D%2D%2D%2D%0AVersion%3A%20GnuPG > > (etc) > > > Why don't you think I handle that case correctly? I apply a > Wserver.decodeto the whole string, and then do sscanf on it to extract > the keytext. Like > this: > > # > Wserver.decode"keytext%3D%2D%2D%2D%2D%2DBEGIN%20PGP%20PUBLIC%20KEY%20BLOCK%2D%2D%2D%2D%2D%0AVersion%3A%20GnuPG";; > - : string = "keytext=-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: GnuPG"
Ah, I missed that in the ocaml. > Actually, now I think I understand the bug. The %s in the sscanf doesn't > capture everything, just the next word (as broken by spaces). That's why > Jason's patch does the right thing but mine is wrong. > > I'll fix that right up. It looks good now. I was able to submit a key via the curl-ized gpgkeys_hkp. David _______________________________________________ Sks-devel mailing list Sks-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/sks-devel