protected HttpClient createHttpClient(String aProxyUrl) throws MalformedURLException {
        HttpClient client = super.createHttpClient();

        // Set up the proxy. If there's anything wrong with the URL, throw the Exception.
        HttpHost proxyHttpHost = null;
        if (UtilityMethods.isValidString(aProxyUrl)) {
            URL proxyUrl;
            proxyUrl = new URL(aProxyUrl);
            proxyHttpHost = new HttpHost(proxyUrl.getHost(), proxyUrl.getPort(), proxyUrl.getProtocol());
            client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxyHttpHost);
        } else {
            throw new MalformedURLException("Invalid URL string: " + aProxyUrl);
        }
        return client;
    }