[aur-dev] Output buffering and header() usage

Dan McGee dpmcgee at gmail.com
Tue Jun 21 12:19:29 EDT 2011


On Tue, Jun 21, 2011 at 11:11 AM, Lukas Fleischer
<archlinux at cryptocrack.de> wrote:
> Some possible solutions/workarounds that came into my mind:
>
> * Use javascript redirects instead.
>
> * Just buffer output everywhere (ob_start(), ob_flush()).
>
> * Rewrite package search to retrieve package search results before even
>  printing out anything.
>
> Thoughts? I tend to prefer the latter, cause it seems to be the only
> clean way (and the MVC way) of doing this.

"Don't automatically redirect" is actually what I just did. Not
because archweb had the bug, but I was finding the behavior annoying,
and at least in the case where a package may or may not be in testing,
sometimes the redirect happens while other times it doesn't.

However, if you are going to do anything, I'd say package search
itself should be refactored off into some library code, and once you
get the results back you can actually start thinking about what to do
with them.

-Dan

[1] http://projects.archlinux.org/archweb.git/commit/?id=00eb8f426a8ddb905fcf8b241eb29b687b9db8ed


More information about the aur-dev mailing list