January 05, 2006
1.
The document comment for the std.uri.decode() function states
> 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?

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.


January 08, 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 states
>> 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?

I think the doc is wrong here. I'll fix it.