Use g_ascii_str(n)casecmp() instead of str(n)casecmp(). The strings we are
authorTor Lillqvist <tml@novell.com>
Thu, 15 Sep 2005 12:33:22 +0000 (12:33 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Thu, 15 Sep 2005 12:33:22 +0000 (12:33 +0000)
2005-09-15  Tor Lillqvist  <tml@novell.com>

* camel-http-stream.c (http_connect, http_get_statuscode): Use
g_ascii_str(n)casecmp() instead of str(n)casecmp(). The strings we
are comparing in these cases should be just ASCII anyway, so spell
it out that we really do need ASCII casefolding only.

camel/ChangeLog
camel/camel-http-stream.c

index c7805e9..bb2b7ae 100644 (file)
@@ -1,10 +1,11 @@
 2005-09-15  Tor Lillqvist  <tml@novell.com>
 
        * broken-date-parser.c (get_wday, get_month)
-       * camel-folder-search.c (check_header): Use g_ascii_str(n)casecmp() 
-       instead of str(n)casecmp(). The strings we are comparing in these
-       cases should be just ASCII anyway, so spell it out that we really
-       do need ASCII casefolding only.
+       * camel-folder-search.c (check_header)
+       * camel-http-stream.c (http_connect, http_get_statuscode): Use
+       g_ascii_str(n)casecmp() instead of str(n)casecmp(). The strings we
+       are comparing in these cases should be just ASCII anyway, so spell
+       it out that we really do need ASCII casefolding only.
 
        * camel-debug.c: Use e_util_pthread_id() to identify threads.
 
index 1343a58..ccaa06f 100644 (file)
@@ -179,7 +179,7 @@ http_connect (CamelHttpStream *http, CamelURL *url)
 
        d(printf("connecting to http stream @ '%s'\n", url->host));
 
-       if (!strcasecmp (url->protocol, "https")) {
+       if (!g_ascii_strcasecmp (url->protocol, "https")) {
 #ifdef HAVE_SSL
                stream = camel_tcp_stream_ssl_new (http->session, url->host, SSL_FLAGS);
 #endif
@@ -267,7 +267,7 @@ http_get_statuscode (CamelHttpStream *http)
        d(printf("HTTP Status: %s\n", buffer));
 
        /* parse the HTTP status code */
-       if (!strncasecmp (buffer, "HTTP/", 5)) {
+       if (!g_ascii_strncasecmp (buffer, "HTTP/", 5)) {
                token = http_next_token (buffer);
                http->statuscode = camel_header_decode_int (&token);
                return http->statuscode;