@@ -95,7 +95,7 @@ public void handle(final HttpExchange exchange) throws IOException {
9595 } else if (Regex .simpleMatch ("GET /storage/v1/b/" + bucket + "/o*" , request )) {
9696 // List Objects https://cloud.google.com/storage/docs/json_api/v1/objects/list
9797 final Map <String , String > params = new HashMap <>();
98- RestUtils .decodeQueryString (exchange .getRequestURI (). getQuery (), 0 , params );
98+ RestUtils .decodeQueryString (exchange .getRequestURI (), params );
9999 final String prefix = params .getOrDefault ("prefix" , "" );
100100 final String delimiter = params .get ("delimiter" );
101101
@@ -212,7 +212,7 @@ public void handle(final HttpExchange exchange) throws IOException {
212212 } else if (Regex .simpleMatch ("POST /upload/storage/v1/b/" + bucket + "/*uploadType=resumable*" , request )) {
213213 // Resumable upload initialization https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload
214214 final Map <String , String > params = new HashMap <>();
215- RestUtils .decodeQueryString (exchange .getRequestURI (). getQuery (), 0 , params );
215+ RestUtils .decodeQueryString (exchange .getRequestURI (), params );
216216 final String blobName = params .get ("name" );
217217 blobs .put (blobName , BytesArray .EMPTY );
218218
@@ -237,7 +237,7 @@ public void handle(final HttpExchange exchange) throws IOException {
237237 } else if (Regex .simpleMatch ("PUT /upload/storage/v1/b/" + bucket + "/o?*uploadType=resumable*" , request )) {
238238 // Resumable upload https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload
239239 final Map <String , String > params = new HashMap <>();
240- RestUtils .decodeQueryString (exchange .getRequestURI (). getQuery (), 0 , params );
240+ RestUtils .decodeQueryString (exchange .getRequestURI (), params );
241241
242242 final String blobName = params .get ("test_blob_name" );
243243 if (blobs .containsKey (blobName ) == false ) {
@@ -269,8 +269,6 @@ public void handle(final HttpExchange exchange) throws IOException {
269269 exchange .sendResponseHeaders (RestStatus .NOT_FOUND .getStatus (), -1 );
270270 }
271271 } finally {
272- int read = exchange .getRequestBody ().read ();
273- assert read == -1 : "Request body should have been fully read here but saw [" + read + "]" ;
274272 exchange .close ();
275273 }
276274 }
0 commit comments