]> Lady’s Gitweb - Gitweb/commit
gitweb: Fix bug in href(..., -replay=>1) when using 'pathinfo' form
authorJakub Narebski <redacted>
Thu, 14 Feb 2008 08:22:30 +0000 (09:22 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:12 +0000 (00:07 -0400)
commit56b1a1c30ebc43edb4221ed1a8f8213f9807adf9d03338bfa004cd8ba9bf310e
tree9b41aa6f3ba65400399da41f43b38221e4577f8f9b9a19b45ef292130840867d
parent0d53536c5b2108702d45d7fb4e6ea1575fbb6593dab9a916023742380cfb1da1
gitweb: Fix bug in href(..., -replay=>1) when using 'pathinfo' form

URLs generated by href(..., -replay=>1) (which includes 'next page'
links and alternate view links) didn't set project info correctly
when current page URL is in pathinfo form.

This resulted in broken links such like:

  http://www.example.com/w/ARRAY(0x85a5318)?a=shortlog;pg=1

if the 'pathinfo' feature was used, or

  http://www.example.com/w/?a=shortlog;pg=1

if it wasn't, instead of correct:

  http://www.example.com/w/project.git?a=shortlog;pg=1

This was caused by the fact that href() always replays params in the
arrayref form, were they multivalued or singlevalued, and the code
dealing with 'pathinfo' feature couldn't deal with $params{'project'}
being arrayref.

Setting $params{'project'} is moved before replaying params; this
ensures that 'project' parameter is processed correctly.

Noticed-by: Peter Oberndorfer <redacted>
Noticed-by: Wincent Colaiuta <redacted>
Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.281432 seconds and 4 git commands to generate.