Uploaded image for project: 'Red Hat build of Apache Camel for Spring Boot'
  1. Red Hat build of Apache Camel for Spring Boot
  2. CSB-3290

camel-http ignoreCookies option does not work as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Normal Normal
    • None
    • CSB-4.0, CSB-3.20.1
    • Camel
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Very Likely
    • 0

      camel-http provides an option to disable cookies, but it does not work as expected.
      https://access.redhat.com/documentation/en-us/red_hat_build_of_apache_camel_for_spring_boot/3.20/html/camel_spring_boot_reference/csb-camel-http-component-starter#disabling_cookies

      camel route

      <?xml version="1.0" encoding="UTF-8"?>
          <route id="route-3e6bf23e-e730-47ce-859f-953bcc9779e9">
              <from uri="timer:xml?repeatCount=1"/>
              <setHeader name="cookie">
                  <constant>aaa=bbb=ccc; ddd</constant>
              </setHeader>
              <to id="myHttpProducer" uri="http://localhost:8181/hawtio?httpClient.cookieSpec=ignoreCookies"/>
              <log message="done}"/>
          </route>
      

      The request packet which contains the cookie

      Frame 125625: 325 bytes on wire (2600 bits), 325 bytes captured (2600 bits) on interface any, id 0
      Linux cooked capture v1
      Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
      Transmission Control Protocol, Src Port: 42160, Dst Port: 8181, Seq: 1, Ack: 1, Len: 257
      Hypertext Transfer Protocol
          GET /hawtio HTTP/1.1\r\n
          cookie: aaa=bbb=ccc; ddd\r\n
          firedTime: Mon Dec 18 09:49:10 JST 2023\r\n
          Host: localhost:8181\r\n
          Connection: Keep-Alive\r\n
          User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)\r\n
          Accept-Encoding: gzip,deflate\r\n
          \r\n
          [Full request URI: http://localhost:8181/hawtio]
          [HTTP request 1/1]
          [Response in frame: 125627]
      

      The issue occurs with CSB 4.0.0 too.

            johnpoth John Poth
            rhn-support-hfuruich Hisao Furuichi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: