jquery-archive / plugins.jquery.com

The jQuery Plugins site
plugins.jquery.com
Other
1.24k stars 244 forks source link

All name matching should be case-insensitive #73

Open scottgonzalez opened 11 years ago

rdworth commented 11 years ago

Would we determine the url based on the capitalization (case) of the name in the manifest?

rdworth commented 11 years ago

My next question was going to be "Would we allow any case of url to be typed and redirect to the normative cased?" but I just tested it and we currently support urls with mixed case that doesn't match the name in the manifest, without any redirect. This seems wrong, as it means each plugin has an extremely large number of supported root urls, rather than one.

scottgonzalez commented 11 years ago

We can probably have WordPress auto-redirect, just like it does for the trailing slash. I'd prefer using lowercase URLs because it would mean that the developer can't change URL casing per release.

rdworth commented 11 years ago

I understand your concern, but not allowing caps in urls (as much as it is something I would never do) would force some people to have some crappy urls. As an example, /AnythingZoomer/ becomes /anythingzoomer/. This makes a big difference in readability. I'm sure I could come up with other examples that combine words in weird ways and are even harder to read without caps.

When a name is reserved successfully, can we just stick with the capitalization of the name in the first successfully processed manifest?

scottgonzalez commented 11 years ago

As long as XML-RPC will resolve lowercase names to the proper capitalization, I think it we can do that.

scottgonzalez commented 11 years ago

It seems to me like it'd be a bad idea to let the user choose the casing, but then let the casing get out of sync with the manifest if they change their manifest. Either we give the user full control over the casing (meaning they can change it by changing their manifest), or we force it to lowercase.

nacin commented 11 years ago

We can probably make it so:

The problem with the redirect is it realistically needs to be a 302, to avoid possible redirect loops if a plugin developer changes their casing twice — A to B, then B to A. Ideally a plugin developer just shouldn't change their casing, but a 302 redirect is probably sufficient "punishment" for them to do so. And allows for the manifest to match.

scottgonzalez commented 11 years ago

That sounds good to me.