Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-604

Don't issue a warning when using getResponseBodyAsString

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.0.1
    • None
    • None
    • None

    Description

      If I use the method HttpMethodBase.getResponseBodyAsString I get a log message with log level warning. We take our log output very seriously. For us warning means, something has to done. But we use this method to get information from a trusted intranet webapplication. The http spec does not expect content-length to be set. So this intranet webapp behaves perfectly ok. And our application also does the right thing.

      Please, please (so many libraries are too verbose in there logging) put a warning in the javadoc but don't log a warning.

      For us this is a bug. We can't use this method. We have to use a workaround like this:

      IOUtils.toString(method.getResponseBodyAsStream());

      Unfortunately we have to deal with the encoding by ourselves now.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hdockter Hans Dockter
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: