New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite support #7

Closed
piersharding opened this Issue Jan 25, 2011 · 4 comments

Comments

Projects
None yet
2 participants
@piersharding

piersharding commented Jan 25, 2011

Hi -
I've just installed Lessnmore using sqlite as the backend (mainly for convenience and testing), and have found it works after I removed the BINARY keyword from any of the SQL statements - all around the table urls,

I've hacked this out for my purposes, and I'm not sure how you'd want to deal with this internally (if you want to support sqlite at all).

Cheers,
Piers Harding.

@alanhogan

This comment has been minimized.

Show comment
Hide comment
@alanhogan

alanhogan Jan 26, 2011

Owner

Thanks for the report, Piers. I’ll tackle this in the next version of Lessn More.

I welcome any patches, forks, or pull requests.

Now I also want to tell you why I added BINARY in the first place — because without it, SQL queries (at least in MySQL!) match regardless of case — this means that if you have two URLs defined with similar cases, e.g. example.com/a and example.com/A — then redirections will probably end up at ONE url no matter which short URL you go to!

Can you confirm for me whether your system is afflicted by this bug or not? For example, set up /foo and /FOO where foo goes to, say, google.com and FOO goes to this page?

Thanks!

Owner

alanhogan commented Jan 26, 2011

Thanks for the report, Piers. I’ll tackle this in the next version of Lessn More.

I welcome any patches, forks, or pull requests.

Now I also want to tell you why I added BINARY in the first place — because without it, SQL queries (at least in MySQL!) match regardless of case — this means that if you have two URLs defined with similar cases, e.g. example.com/a and example.com/A — then redirections will probably end up at ONE url no matter which short URL you go to!

Can you confirm for me whether your system is afflicted by this bug or not? For example, set up /foo and /FOO where foo goes to, say, google.com and FOO goes to this page?

Thanks!

@piersharding

This comment has been minimized.

Show comment
Hide comment
@piersharding

piersharding Jan 26, 2011

Hi -

I've checked
example.com/FOO -> AFOO
example.com/foo -> afoo
&
www.bbc.co.uk -> FOO
www.google.com -> foo

and all seems to work as I'd expect - ie it is case sensitive.

Thanks for your work on this - it's just what I need for a friendly URL service inside a K12 school environment.

Cheers,
Piers Harding.

piersharding commented Jan 26, 2011

Hi -

I've checked
example.com/FOO -> AFOO
example.com/foo -> afoo
&
www.bbc.co.uk -> FOO
www.google.com -> foo

and all seems to work as I'd expect - ie it is case sensitive.

Thanks for your work on this - it's just what I need for a friendly URL service inside a K12 school environment.

Cheers,
Piers Harding.

@alanhogan

This comment has been minimized.

Show comment
Hide comment
@alanhogan

alanhogan Jan 26, 2011

Owner

Excellent, Piers. Thanks for checking that for me. I’ll be sure to address this in the next version.

Glad you’re finding LM useful.

Owner

alanhogan commented Jan 26, 2011

Excellent, Piers. Thanks for checking that for me. I’ll be sure to address this in the next version.

Glad you’re finding LM useful.

@alanhogan

This comment has been minimized.

Show comment
Hide comment
@alanhogan

alanhogan Apr 8, 2012

Owner

Addressed this in the latest builds (currently development branch). Let me know if it works for you.

Owner

alanhogan commented Apr 8, 2012

Addressed this in the latest builds (currently development branch). Let me know if it works for you.

@alanhogan alanhogan closed this in b1b4c83 Apr 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment