Needs work
Project:
Path redirect
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2009 at 20:43 UTC
Updated:
12 Jan 2012 at 21:58 UTC
Jump to comment: Most recent file
Comments
Comment #1
jcarnett commentedI just remembered that MySQL string comparisons are case-insensitive by default, so this is really only applicable to PostgreSQL folks.
I suppose that leads to another question then: should the path lookups be done in a case-sensitive manner in MySQL? I think initially I compared this module to Apache redirects which are case sensitive, but I'd like to know what everyone else thinks.
Comment #2
dave reidI don't see any reason why we should be allowing case-sensitive redirections. Let's make the default behavior case-insensitive.
Comment #3
dave reidWill need a re-roll.
Comment #4
wim leersSee #973700: Make redirects case sensitive, starting from follow-up #4.
Comment #5
jack.r.abbit commentedWhy is this closed as a duplicate when the other one came after this one and the patch here is much more comprehensive than the patch over at the newer one?
We ran into an issue where the redirects were failing because some of the parameters being passed were of difference case. I just went in and hacked one line of code to fix that where it loops through the query string array. My issue certainly would not have been fixed with that other patch. I do believe it would if this one is updated.
Also, I think options are good and would like to see it a configurable options.
Comment #6
wim leers@jack.r.abbit (cool nickname btw :P) My apologies, I simply hadn't noticed the patch! I agree with what you're saying. Could you maybe post a re-roll so we can move this forward?
Comment #7
jack.r.abbit commentedOK... re-rolled the original patch to work against the current 6.x-1.x-dev (which is the same as 6.x-1.0-rc1, both from 2010-Oct-07).
I don't know what version of code the original patch was against but a lot of it didn't match the current version. It adds the advanced option like the original but defaults it to checked. But I also employed the "binary" query method from Wim Leers' patch referenced in #4.
So there are two places that case comes into play:
1) When pulling from the database, we need to conditionally check the case of the source path. However, if there is a query, it does not get examined here.
2) If there is a query, the values get compared elsewhere so the compare function now accept a a 3rd param to indicate to ignore case.
Both places trigger off the same "ignore_case" flag. One could argue that these could be two separate flags but I didn't see the need. It would be easy enough to split those if needed though.
Comment #8
jack.r.abbit commentedstrange... the patch didn't attach the first time.
Comment #10
jack.r.abbit commentedMy bad for not thinking about other use cases for the compare array function. Let's see if this one gets by the tests.
Comment #11
jack.r.abbit commentedbah... I wish I could delete my own comments since I keep messing up what I want to do.
Again... with a smile :)
Comment #12
jack.r.abbit commentedI give up. Not sure why the attached patch is being ignored. Give it a try if you want to. Would love to see this functionality built in.
Comment #13
wim leersI just noticed http://drupal.org/cvs?commit=459664. I don't think this fixes the problem.
Comment #15
nicholas.alipaz commentedThis is a pretty big issue for path redirects IMO. I mean say I direct a url like:
v42/index.cvn?id=10023
to
new-page
but that url was also accessible via:
v42/index.cvn?ID=10023
and other variations, then the url becomes inaccessible where linked differently.
I think we are going to have to go the route of adding mod_speling to our server and forcing urls to lowercase before they hit path redirect.
Comment #16
freelockHmm. Definitely something needs to be committed here -- the current 6.x-1.0-rc2 module won't let you save two redirects that only vary by case -- and yet it does a case-sensitive redirect.
We definitely want case-insensitive redirects.
But reviewing the patch, I don't think this will work in Postgres -- LIKE is case-sensitive in postgres (and to comment #1 above, MySQL is case sensitive with =).