digitalmars.D.bugs - std.uri bugs?
- k.inaba (17/18) Jan 05 2006 but decode("%41%42%43") returns "ABC". ('A', 'B', and 'C' seems to be va...
- Walter Bright (3/11) Jan 08 2006 I think the doc is wrong here. I'll fix it.
1. The document comment for the std.uri.decode() function statesEscape sequences that resolve to valid URI characters are not replaced.but decode("%41%42%43") returns "ABC". ('A', 'B', and 'C' seems to be valid URI characters, but replaced.) Maybe this behaviour is intended, and the document should be corrected? 2. The std.uri module internally allocates temporary buffers by alloca() on stack. But this causes a problem when one deals with large strings: import std.uri; void main() { char[] str = new char[10000000]; // about 10MB str[] = 'A'; encodeComponent(str); } This example halts on "Error: Stack Overflow" on my WinXP+dmd 1.42 environment. All allocas in this module should be rewritten to heap allocation, i think. Or at least, this limitation should be noted in the document.
Jan 05 2006
"k.inaba" <k.inaba_member pathlink.com> wrote in message news:dpjmhp$2hcp$1 digitaldaemon.com...1. The document comment for the std.uri.decode() function statesI think the doc is wrong here. I'll fix it.Escape sequences that resolve to valid URI characters are not replaced.but decode("%41%42%43") returns "ABC". ('A', 'B', and 'C' seems to be valid URI characters, but replaced.) Maybe this behaviour is intended, and the document should be corrected?
Jan 08 2006