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

Ordering HttpClient Headers does not seem possible

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 4.1 Final
    • None
    • HttpClient (classic)
    • Windows 7, Java 1.6.0_21

    Description

      It seems impossible to have the HttpClient headers sent "before" the HttpRequest headers.

      When inspecting the headers of the actual connection, these headers will appear BEFORE the HttpClient
      headers.

      For example, note the order the header values are set in the following code:

      // Set the User-Agent value for the HttpClient
      myHttpParams.setParameter(CoreProtocolPNames.USER_AGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322");

      // Set the Accept-Language value for the request
      request.addHeader(HttpHeaders.ACCEPT_LANGUAGE, "en-us,en;q=0.5");

      // Upon execution, the request will send the headers in the following order

      Accept-Language: en-us,en;q=0.5
      User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)

      Attachments

        Activity

          People

            Unassigned Unassigned
            troccola Ted Troccola
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: