Source:
public void handleSendMessage(Message aMessage) throws IllegalArgumentException, IOException { final HttpMessage httpMessage = (HttpMessage) aMessage; httpMessage.setRequestingUser(null); try { final ModeRedirectionValidator redirectionValidator = new ModeRedirectionValidator(); boolean useAntiCSRF = getButtonUseCsrf().isSelected(); boolean followRedirects = getButtonFollowRedirects().isSelected(); if (useAntiCSRF && extAntiCSRF != null) { extAntiCSRF.regenerateAntiCsrfToken(httpMessage, getDelegate()::sendAndReceive); } if (followRedirects) { getDelegate() .sendAndReceive( httpMessage, HttpRequestConfig.builder() .setRedirectionValidator(redirectionValidator) .build()); } else { getDelegate().sendAndReceive(httpMessage, false); } EventQueue.invokeAndWait( new Runnable() { @Override public void run() { if (!httpMessage.getResponseHeader().isEmpty()) { responsePanel.updateContent(); if (!followRedirects) { persistAndShowMessage(httpMessage); } else if (!redirectionValidator.isRequestValid()) { View.getSingleton() .showWarningDialog( Constant.messages.getString( "manReq.outofscope.redirection.warning", redirectionValidator .getInvalidRedirection())); } } } }); ZapGetMethod method = (ZapGetMethod) httpMessage.getUserObject(); notifyPersistentConnectionListener(httpMessage, null, method); } catch (final HttpMalformedHeaderException mhe) { throw new IllegalArgumentException("Malformed header error.", mhe); } catch (final UnknownHostException uhe) { throw new IOException("Error forwarding to an Unknown host: " + uhe.getMessage(), uhe); } catch (final SSLException sslEx) { throw sslEx; } catch (final IOException ioe) { throw new IOException( "IO error in sending request: " + ioe.getClass() + ": " + ioe.getMessage(), ioe); } catch (final Exception e) { logger.error(e.getMessage(), e); } }

Target:
public void handleSendMessage(Message aMessage) throws IllegalArgumentException, IOException { final HttpMessage httpMessage = (HttpMessage) aMessage; httpMessage.setRequestingUser(null); try { final ModeRedirectionValidator redirectionValidator = new ModeRedirectionValidator(); boolean followRedirects = getButtonFollowRedirects().isSelected(); if (extAntiCSRF != null && getButtonUseCsrf().isSelected()) { extAntiCSRF.regenerateAntiCsrfToken(httpMessage, getDelegate()::sendAndReceive); } if (followRedirects) { getDelegate() .sendAndReceive( httpMessage, HttpRequestConfig.builder() .setRedirectionValidator(redirectionValidator) .build()); } else { getDelegate().sendAndReceive(httpMessage, false); } EventQueue.invokeAndWait( new Runnable() { @Override public void run() { if (!httpMessage.getResponseHeader().isEmpty()) { responsePanel.updateContent(); if (!followRedirects) { persistAndShowMessage(httpMessage); } else if (!redirectionValidator.isRequestValid()) { View.getSingleton() .showWarningDialog( Constant.messages.getString( "manReq.outofscope.redirection.warning", redirectionValidator .getInvalidRedirection())); } } } }); ZapGetMethod method = (ZapGetMethod) httpMessage.getUserObject(); notifyPersistentConnectionListener(httpMessage, null, method); } catch (final HttpMalformedHeaderException mhe) { throw new IllegalArgumentException("Malformed header error.", mhe); } catch (final UnknownHostException uhe) { throw new IOException("Error forwarding to an Unknown host: " + uhe.getMessage(), uhe); } catch (final SSLException sslEx) { throw sslEx; } catch (final IOException ioe) { throw new IOException( "IO error in sending request: " + ioe.getClass() + ": " + ioe.getMessage(), ioe); } catch (final Exception e) { logger.error(e.getMessage(), e); } }