Skip to content

Commit 1a91fee

Browse files
authored
(no bug) add a doc comment explaining the REWRITE_ stuff (#98)
1 parent 020b024 commit 1a91fee

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

extensions/BMO/Extension.pm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2799,6 +2799,17 @@ sub app_startup {
27992799
}
28002800
);
28012801

2802+
# In previous versions of bugzilla, an .htaccess file was used to redirect
2803+
# urls (often in the form of form:name or form.name) to different .cgi
2804+
# endpoints.
2805+
#
2806+
# Since the port to Mojolicious, we do this by adding additional routes.
2807+
# This is accomplished with a placeholder that we consistently prefix with
2808+
# REWRITE_, and as you can see below is followed by an arrayref mapping the
2809+
# (arbitrary) name to a regular expression and a destination.
2810+
#
2811+
# The REWRITE_ prefix is only significant because it is removed from the fake
2812+
# CGI environment in Bugzilla::App::CGI
28022813
$r->any('/:REWRITE_itrequest' => [REWRITE_itrequest => qr{form[\.:]itrequest}])
28032814
->to('CGI#enter_bug_cgi' =>
28042815
{'product' => 'Infrastructure & Operations', 'format' => 'itrequest'});

0 commit comments

Comments
 (0)