@@ -286,21 +286,21 @@ public void setBody(final String body) {
286
286
287
287
@ Override
288
288
public void process (final String input ) {
289
- try {
290
- final String requestUrl = getInput (input , url );
291
- final String requestBody = getInput (input ,
292
- body == null && method .getRequestHasBody () ? INPUT_DESIGNATOR : body );
289
+ final String requestUrl = getInput (input , url );
290
+ final String requestBody = getInput (input ,
291
+ body == null && method .getRequestHasBody () ? INPUT_DESIGNATOR : body );
293
292
293
+ try {
294
294
final URL urlToOpen = new URL (requestUrl );
295
295
final HttpURLConnection connection = requestBody != null ?
296
296
doOutput (urlToOpen , requestBody ) : doRedirects (urlToOpen );
297
297
298
298
final InputStream inputStream = getInputStream (connection );
299
299
final String charset = getContentCharset (connection );
300
-
301
- getReceiver (). process ( new InputStreamReader (
302
- "gzip" . equalsIgnoreCase ( connection . getContentEncoding ()) ?
303
- new GZIPInputStream ( inputStream ) : inputStream , charset ) );
300
+ final Reader reader = new InputStreamReader (
301
+ "gzip" . equalsIgnoreCase ( connection . getContentEncoding ()) ?
302
+ new GZIPInputStream ( inputStream ) : inputStream , charset );
303
+ getReceiver (). process ( reader );
304
304
}
305
305
catch (final IOException e ) {
306
306
throw new MetafactureException (e );
0 commit comments