git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] gitweb: refactor input parameters parse/validation

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 8, 2008, 09:45 UTC
Message-ID
<200810081145.37983.jnareb@gmail.com>
In-Reply-To
<cb7bb73a0810080210s49d1683dj4e2fef8072522abd@mail.gmail.com>
Giuseppe Bilotta wrote:
> On Tue, Oct 7, 2008 at 4:39 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> > Giuseppe Bilotta wrote:
Show 9 quoted lines
> > Wouldn't it be simpler and as good solution to just leave validation
> > off evaluate_path_info() (well, of course except check_head_link() test),
> > and allow it to be validated when assigning global 'params' variables?
> > check_head_link() would be repeated for path_info links, but that
> > should not affect performance much.
> 
> Well, it does have a performance hit in the case of invalid $project
> since it spends time working on the rest of the URL before bailing
> out, but it's probably the cleanest solution. I'll do it this way.

I have forgot about this fact, that parameter validation serves also as early escape. But I don't think it is much performance hit in practice; it is performance (optimization) vs. maintability tradeoff.

-- 
Jakub Narebski
Poland
Previous: Giuseppe BilottaNext: Giuseppe Bilotta
Message 6 of 11 in “gitweb: refactor input parameters parse/validation”
  1. gitweb: refactor input parameters parse/validationGiuseppe Bilotta, Oct 3, 2008
  2. Jakub NarebskiOct 7, 2008
  3. Giuseppe BilottaOct 7, 2008
  4. Jakub NarebskiOct 7, 2008
  5. Giuseppe BilottaOct 8, 2008
  6. Jakub NarebskiOct 8, 2008
  7. [PATCHv2] gitweb: refactor input parameters parse/validationGiuseppe Bilotta, Oct 8, 2008
  8. Jakub NarebskiOct 10, 2008
  9. Shawn O. PearceOct 10, 2008
  10. Giuseppe BilottaOct 10, 2008
  11. [PATCHv3] gitweb: refactor input parameters parse/validationGiuseppe Bilotta, Oct 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.