Comment 1 for bug 996879

Revision history for this message
Ying Chun Guo (daisy-ycguo) wrote :

When getting hosts, it uses SQLAlchemy to query database, which is case insensitive.

When updating hosts, firstly it will check whether the host exists. Scheduler RPC API is used to get the host list. And then, it will verify whether the host name is in the host list, where case is sensitive.

The domain names of URL are not case-sensitive, while the rest of the URL might be. If we change the "GET" url to case sensitive, we need to change the definition of table "services". If we change the "PUT" url to be case insensitive, we just need to change the code to covert all characters to lower case when comparing. It's quite easy. I perfer the easier one.

REFER TO: http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html
"For nonbinary strings (CHAR, VARCHAR, TEXT), string searches use the collation of the comparison operands. The default character set and collation are latin1 and latin1_swedish_ci, so nonbinary string comparisons are case insensitive by default."