Uploaded image for project: 'Commons Jelly'
  1. Commons Jelly
  2. JELLY-96

HttpClient cannot be specified in HttpSession

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-5
    • taglib.http
    • None

    Description

      org.apache.commons.jelly.tags.http.SessionTag always creates a new HttpClient rather than using one provided by the user.

      The doTag method should be changed from this:

      public void doTag(XMLOutput xmlOutput) throws JellyTagException {
      if (isProxyAvailable())

      { _httpClient = new HttpClient(); _httpClient.getHostConfiguration().setProxy(getProxyHost(), getProxyPort()); }

      else

      { _httpClient = new HttpClient(); }

      ...to this:

      public void doTag(XMLOutput xmlOutput) throws JellyTagException {
      if (_httpClient == null)
      _httpClient = new HttpClient();

      if (isProxyAvailable())

      { _httpClient.getHostConfiguration().setProxy(getProxyHost(), getProxyPort()); }

      invokeBody(xmlOutput);
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            jdhorne Jason Horne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: