On Tue, 11 Apr 2006 21:00:01 +0000 (UTC) "Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum" 10353@lyskom.lysator.liu.se wrote:
--- module.pmod.orig Fri Aug 26 07:49:13 2005 +++ module.pmod Tue Apr 11 16:21:24 2006 @@ -1056,7 +1056,7 @@
return map( indices(headers), lambda(string hname){
return map(headers[hname]/"\0",
return map(Array.flatten(map(arrayp(headers[hname]) ? headers[hname] : ({headers[hname]}), `/, "\0")), lambda(string header,string hname) { return hname+": "+header; },
That looks wrong. If you want to reintroduce support for the array style, do it like this:
return map(headers[hname]/"\0",
return map((arrayp(headers[hname])?
headers[hname] : headers[hname]/"\0"),
There should never be _both_ styles of multi-headers in the same object.
Ok, that makes sense now that I know what the \0 business is all about.
I'm curious now, why does giving it an array work, when headers is declared as "mapping(string:string) headers;"?
Adam