On Thu, 9 Dec 2004 08:26:44 +0100, Marcus Ramberg wrote
> Hey.
>
> Simon, I see you've reworked headers support in Maypole. It looks
> very clean, and I'm not going debate if the extra two objects on
> each request will affect performance, however I did find a few
> issues with the implementation.
I hope you don't mind. I did propose something along these lines a few months
ago. I think it's a good idea to use HTTP::Headers because it's a pretty
rounded wheel by now, and it's easier to set multiple headers with the same
field name. And it also normalises field names, which is a good thing. I'd
think the performance is negligable.
> The reason I added extra_headers was I need to set
> $r->{extra_headers}{"Content-Disposition"} to set downloads with a
> given filename in mitiki. That seems to be foiled by
> next if /^Content-/; - so I've changed it to
> next if /^Content-(Type|Length)/;
Thanks. I was being a bit lazy there. I was idly wondering whether we should
proxy $r->content_type and $r->document_encoding to $r->headers_out. But I
suspect there are lots of people using $r->{content_type}.
> Also, Apache::MVC was creating a new HTTP::Headers for in rather
> than Maypole::Headers. Finally, I added a note in the HTTP::Headers
> synopsis, as it seemed confusing that headers_out was created
> manually there.
>
> Anyhow, it seems to work fine for me now. Good work.
>
> Ps. I accidentally commited a more controversial change as well,
> setting action to "index" for those cases where it's not defined. I
> want this to go into Maypole, maybe even with a change to set action
I'm not sure about this. I did add a unit test, but now I think about it,
doesn't the action default to 'list'? I can't see where that happens.
> to first args if action isn't public. (ie /page/NotPublicAction ->
> /page/index/NotPublicAction) but I understand this is controversial,
I think that's probably best handled in a custom parse_path(). That's what's
suggested by Maypole::Manual::Request at least.
--simonflk
_______________________________________________
maypole-dev mailing list
maypole-dev at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole-dev
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT