|
72 | 72 | import com.google.apphosting.api.ApiProxy.ApiConfig; |
73 | 73 | import com.google.apphosting.api.ApiProxy.Environment; |
74 | 74 | import com.google.apphosting.datastore_bytes.proto2api.DatastoreV3Pb; |
| 75 | +import com.google.common.base.Ascii; |
75 | 76 | import com.google.common.collect.Lists; |
76 | 77 | import com.google.common.collect.Ordering; |
77 | 78 | import com.google.common.truth.Correspondence; |
@@ -324,12 +325,14 @@ static class MockQueueBulkAddApiHelper extends QueueApiHelper { |
324 | 325 | Ordering.natural() |
325 | 326 | .onResultOf( |
326 | 327 | header -> { |
327 | | - if (DEFAULT_NAMESPACE_HEADER.equals(header.getKey()) |
328 | | - || CURRENT_NAMESPACE_HEADER.equals(header.getKey())) { |
| 328 | + if (Ascii.equalsIgnoreCase( |
| 329 | + QueueImpl.DEFAULT_NAMESPACE_HEADER, header.getKey().toStringUtf8()) |
| 330 | + || Ascii.equalsIgnoreCase( |
| 331 | + QueueImpl.CURRENT_NAMESPACE_HEADER, header.getKey().toStringUtf8())) { |
329 | 332 | return 1; // Sort namespace headers after user-specified headers. |
330 | | - } else if ("content-type".equalsIgnoreCase(header.getKey().toStringUtf8()) |
331 | | - && "application/x-www-form-urlencoded" |
332 | | - .equalsIgnoreCase(header.getValue().toStringUtf8())) { |
| 333 | + } else if (Ascii.equalsIgnoreCase("content-type", header.getKey().toStringUtf8()) |
| 334 | + && Ascii.equalsIgnoreCase( |
| 335 | + "application/x-www-form-urlencoded", header.getValue().toStringUtf8())) { |
333 | 336 | return 2; // Sort default content-type header last. |
334 | 337 | } else { |
335 | 338 | return 0; // Let everything else remain in the original order (given a stable |
|
0 commit comments