use String.casecmp? for credential header string comparison
use String.casecmp? for credential header string comparison

and move all the header-modification logic to the same place in the method

sparklemotion/mechanize,sparklemotion/mechanize