Move Expect: 100 stripping after asserts against the request

Follow-up to e30f86521
This commit is contained in:
Andrew Phillips 2013-10-17 19:09:36 -04:00 committed by Andrew Gaul
parent 3399816f83
commit 75066730af
1 changed files with 4 additions and 4 deletions

View File

@ -131,12 +131,12 @@ public class BaseBlobSignerLiveTest extends BaseBlobStoreIntegrationTest {
String container = getContainerName();
try {
HttpRequest request = view.getSigner().signPutBlob(container, blob, 3 /* seconds */);
// Strip Expect: 100-continue since Java 7+ will throw a
// ProtocolException instead of setting the response code:
// http://www.docjar.com/html/api/sun/net/www/protocol/http/HttpURLConnection.java.html#1021
request = request.toBuilder().removeHeader(EXPECT).build();
assertEquals(request.getFilters().size(), 0);
// Strip Expect: 100-continue to make actual responses visible, since
// Java 7+ will throw a ProtocolException instead of setting the response code:
// http://www.docjar.com/html/api/sun/net/www/protocol/http/HttpURLConnection.java.html#1021
request = request.toBuilder().removeHeader(EXPECT).build();
Strings2.toString(view.utils().http().invoke(request).getPayload());
assertConsistencyAwareContainerSize(container, 1);