Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-4693

http4 Component not exposing HttpContext

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.8.2
    • 2.9.2, 2.10.0
    • camel-http
    • None
    • Unknown

    Description

      HttpComponents 4.x provides a facility to use a HttpContext for a given request by calling HttpClient.execute(HttpUriRequest, HttpContext), but it looks like the http4 Camel Component doesn't have hooks to use this. Looking at the latest source of org.apache.camel.component.http4.HttpProducer, I only see one way of calling HttpClient.execute():

      protected HttpResponse executeMethod(HttpUriRequest httpRequest) throws IOException

      { return httpClient.execute(httpRequest); }

      Perhaps this could be made available in a similar fashion to HttpClientConfigurer? (for example creating a HttpContextConfigurer)

      My particular symptom is that I'm unable to force the http4 component to use preemptive authentication, which relies on HttpContext in HttpClient 4.x. In HttpClient 3.x, this was made possible by the HttpClientParams flag "authenticationPreemptive". However, it appears that this was removed for 4.x in favor of using HttpContext because of security concerns.

      Attachments

        1. http4-httpContext.patch
          9 kB
          Jeff Segal

        Activity

          People

            davsclaus Claus Ibsen
            uva_jeff Jeff Segal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: