Menu

Two enhancements

2007-04-22
2012-09-04
  • Marcin Okraszewski

    Two minor enhancements. Should be patch - sorry.

    For me the first thing is using chareset from response. If it is given, it uses the one from server, instead of config.

    Second thing is exception. The site I was harveting had several bad links - (spaces or invalid characters). IllegalArgumentException is thrown by HttpClient, if the bad URL is given.

    HttpProcessor:90

        HttpResponseWrapper res;
        try {
            res = manager.execute(method, url, charset, username, password, httpParams, httpHeaderMap);
        } catch ( Exception e ) {
            log.error("Error for " + method + " URL: " + url, e);
        return new EmptyVariable();
        }
        if ( res.getCharset() != null )
            charset = res.getCharset();
    

    Best regards,
    Marcin Okraszewski

     
    • Vladimir Nikic

      Vladimir Nikic - 2007-05-04

      ok, thanks, I'll try to handle both issues for the following release.

       

Log in to post a comment.