Bugzilla – Attachment 111062 Details for
Bug 25548
Package install Apache performs unnecessary redirects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25548: Remove Apache rewrite directives that trigger redirects
Bug-25548-Remove-Apache-rewrite-directives-that-tr.patch (text/plain), 2.75 KB, created by
Julian Maurice
on 2020-10-02 07:54:38 UTC
(
hide
)
Description:
Bug 25548: Remove Apache rewrite directives that trigger redirects
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2020-10-02 07:54:38 UTC
Size:
2.75 KB
patch
obsolete
>From 7004e23eccb1a7798afcec565472bba2ef601a4c Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Wed, 20 May 2020 15:08:05 +1000 >Subject: [PATCH] Bug 25548: Remove Apache rewrite directives that trigger > redirects > >Historically, we have used Apache rewrite directives to strip >query parameters with no arguments from the query >string (e.g. PARAM=&), and then redirect to the new URL. > >However, this slows down user activity, and depending on your >HTTPS and proxy setup can cause suboptimal HTTP downgrades and >upgrades. > >Test Plan: >0) Apply patch >1) Build Debian package >2) Install Debian package and reload Apache >3) Open developer tools on your favourite browser >4) Go to Network tab in developer tools >5) Go to /cgi-bin/koha/opac-main.pl >6) Search for "test" >7) Note a 200 status for "opac-search.pl?idx=&q=test" > >If you got a 302 status for "opac-search.pl?idx=&q=test" >followed by a 200 status for "opac-search.pl?q=test", you >will know that your Apache configuration wasn't updated. > >Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > debian/templates/apache-shared-intranet.conf | 2 -- > debian/templates/apache-shared-opac.conf | 2 -- > 2 files changed, 4 deletions(-) > >diff --git a/debian/templates/apache-shared-intranet.conf b/debian/templates/apache-shared-intranet.conf >index 001342f515..7e58a48158 100644 >--- a/debian/templates/apache-shared-intranet.conf >+++ b/debian/templates/apache-shared-intranet.conf >@@ -15,8 +15,6 @@ ScriptAlias /search "/usr/share/koha/intranet/cgi-bin/catalogue/search.pl" > RewriteEngine on > RewriteRule ^/cgi-bin/koha/(C4|debian|etc|installer/data|install_misc|Koha|misc|selenium|t|test|tmp|xt)/|\.PL$ /notfound [PT] > >-RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*) >-RewriteRule (.+) $1?%1%2 [N,R,NE] > RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/catalogue/detail.pl?biblionumber=$1 [PT] > RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT] > RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT] >diff --git a/debian/templates/apache-shared-opac.conf b/debian/templates/apache-shared-opac.conf >index 2a7e9ace16..2568e0c966 100644 >--- a/debian/templates/apache-shared-opac.conf >+++ b/debian/templates/apache-shared-opac.conf >@@ -12,8 +12,6 @@ ScriptAlias /index.html "/usr/share/koha/opac/cgi-bin/opac/opac-main.pl" > ScriptAlias /search "/usr/share/koha/opac/cgi-bin/opac/opac-search.pl" > ScriptAlias /opac-search.pl "/usr/share/koha/opac/cgi-bin/opac/opac-search.pl" > >-RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*) >-RewriteRule (.+) $1?%1%2 [N,R,NE] > RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/opac-detail\.pl?bib=$1 [PT] > RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT] > RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT] >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25548
:
105136
|
110984
|
110985
|
110986
| 111062 |
111063