code: protected void addUserAgentRequestHeader(HttpState state,
                                               HttpConnection conn)
      throws IOException, HttpException {
          LOG.trace("enter HttpMethodBase.addUserAgentRequestHeaders(HttpState, "
              + "HttpConnection)");
  
          if (getRequestHeader("User-Agent") == null) {
              String agent = (String)getParams().getParameter(HttpMethodParams.USER_AGENT);
              if (agent == null) {
                  agent = "Jakarta Commons-HttpClient";
              }
              setRequestHeader("User-Agent", agent);
          }
      }
docs: Generates default <tt>User-Agent</tt> request header, as long as no
  <tt>User-Agent</tt> request header already exists.
  
  @param state the {@link HttpState state} information associated with this method
  @param conn the {@link HttpConnection connection} used to execute
  this HTTP method
  
  @throws IOException if an I/O (transport) error occurs. Some transport exceptions
  can be recovered from.
  @throws HttpException  if a protocol exception occurs. Usually protocol exceptions
  cannot be recovered from.