I believe these 2 lines are equivalent but after running into a strange issue I no longer believe this to be the case.
String mimeType = context.Request.ContentType;
(String.Compare("text/xml", mimeType, true) == 0))
is the same as :
context.Request.ContentType.ToLower().Equals("text/xml")
Are their implementations in the CLR any different?