@@ -509,7 +509,7 @@ int get_http_header(const char *prefix, const char *buffer,
509509
510510 prefix_len = strlen (prefix);
511511
512- if (strncmp (buffer, prefix, prefix_len) == 0 ) {
512+ if (strncasecmp (buffer, prefix, prefix_len) == 0 ) {
513513 beg = buffer + prefix_len;
514514 end = strchr (beg, ' \r ' );
515515
@@ -602,7 +602,8 @@ swift_temp_auth(const char *auth_url, swift_auth_info *info)
602602 goto cleanup;
603603 }
604604 curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE, &http_code);
605- if (http_code != 200 ) {
605+ if (http_code != 200 &&
606+ http_code != 204 ) {
606607 fprintf (stderr, " error: authentication failed "
607608 " with response code: %ld\n " , http_code);
608609 res = CURLE_LOGIN_DENIED;
@@ -1081,7 +1082,7 @@ size_t upload_header_read_cb(char *ptr, size_t size, size_t nmemb,
10811082
10821083 if (get_http_header (" Etag: " , ptr, etag, array_elements (etag))) {
10831084 if (strcmp (conn->hash , etag) != 0 ) {
1084- fprintf (stderr, " erorr: etag mismatch\n " );
1085+ fprintf (stderr, " error: ETag mismatch\n " );
10851086 exit (EXIT_FAILURE);
10861087 }
10871088 fprintf (stderr, " acked chunk %s\n " , etag);
0 commit comments