Skip to content

Conversation

@Croway
Copy link
Contributor

@Croway Croway commented Jan 16, 2026

…irect to the .md page

Add Accept: text/markdown content negotiation for LLM access.

Requests with Accept: text/markdown header are redirected (303) to the corresponding .md file.

Example:

curl -H "Accept: text/markdown" .../direct-component.html → 303 redirect to direct-component.md

For reference:

  [NC] - No Case
  - Makes the pattern match case-insensitive
  - So text/markdown, Text/Markdown, TEXT/MARKDOWN all match

  [R=303,L] - Two flags combined:
  - R=303 - Redirect with HTTP status code 303 (See Other)
  - L - Last rule
    - Stop processing further rewrite rules if this one matches
    - Without this, Apache continues checking subsequent rules

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may not work with fragments, but I guess it is not a concern for LLMs. Or is it?

@Croway
Copy link
Contributor Author

Croway commented Jan 16, 2026

@squakez interesting, can you provide an example?

@Croway
Copy link
Contributor Author

Croway commented Jan 16, 2026

@davsclaus @squakez @oscerd the issue with the CI might be related to

[check:html     ] 
[check:html     ] /home/runner/work/camel-website/camel-website/public/manual/jbang-commands/examples/run.html
[check:html     ]   1:133  error  Title starts with the `Untitled` make sure that the Asciidoc file starts with level 1 heading  camel/title
[check:html     ] 
[check:html     ] ✖ 1 problem (1 error, 0 warnings)
ERROR: "check:html" exited with 1.

https://github.com/apache/camel/blob/45d0150c311355b669e6f75f28cc96e4f09e85ca/docs/user-manual/modules/ROOT/pages/jbang-commands/examples/run.adoc?plain=1#L1 it starts with two level heading ==, but should start with 1 = @oscerd there may be more examples with this issue?

@oscerd
Copy link
Contributor

oscerd commented Jan 16, 2026

For the moment there is only the run example. So we could simply change that on the core repository and regen. I'm completing one thing and then I'll switch to that, sorry for the inconveinience

@Croway
Copy link
Contributor Author

Croway commented Jan 16, 2026

No problem, I can take care of that, thanks

@oscerd
Copy link
Contributor

oscerd commented Jan 16, 2026

For the moment there is just one example as "example" for camel-run

@Croway
Copy link
Contributor Author

Croway commented Jan 16, 2026

apache/camel#20857 Once merged, what needs to be done so that the camel-website repo is updated? do I just need to rerun the gh action?

@github-actions
Copy link
Contributor

🚀 Preview is available at https://pr-1476--camel.netlify.app

@davsclaus davsclaus merged commit eb97f5f into main Jan 16, 2026
1 of 2 checks passed
@Croway
Copy link
Contributor Author

Croway commented Jan 16, 2026

Works as expected:

$ curl -v -H "Accept: text/markdown" https://camel.apache.org/components/4.14.x/direct-component.html -L
* Host camel.apache.org:443 was resolved.
* IPv6: (none)
* IPv4: 151.101.2.132
*   Trying 151.101.2.132:443...
* Connected to camel.apache.org (151.101.2.132) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=*.apache.org
*  start date: Nov 28 02:18:16 2025 GMT
*  expire date: Feb 26 02:18:15 2026 GMT
*  subjectAltName: host "camel.apache.org" matched cert's "*.apache.org"
*  issuer: C=US; O=Let's Encrypt; CN=R13
*  SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://camel.apache.org/components/4.14.x/direct-component.html
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: camel.apache.org]
* [HTTP/2] [1] [:path: /components/4.14.x/direct-component.html]
* [HTTP/2] [1] [user-agent: curl/8.7.1]
* [HTTP/2] [1] [accept: text/markdown]
> GET /components/4.14.x/direct-component.html HTTP/2
> Host: camel.apache.org
> User-Agent: curl/8.7.1
> Accept: text/markdown
>
* Request completely sent off
< HTTP/2 303
< server: Apache
< location: https://camel.apache.org/components/4.14.x/direct-component.md
< cache-control: max-age=0
< expires: Fri, 16 Jan 2026 16:26:55 GMT
< content-type: text/html; charset=iso-8859-1
< accept-ranges: bytes
< via: 1.1 varnish, 1.1 varnish
< date: Fri, 16 Jan 2026 16:26:56 GMT
< x-served-by: cache-hel1410030-HEL, cache-lin1730039-LIN
< x-cache: MISS, MISS
< x-cache-hits: 0, 0
< x-timer: S1768580816.966200,VS0,VE39
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< content-length: 269
<
* Ignoring the response-body
* Connection #0 to host camel.apache.org left intact
* Issue another request to this URL: 'https://camel.apache.org/components/4.14.x/direct-component.md'
* Found bundle for host: 0xa848088a0 [can multiplex]
* Re-using existing connection with host camel.apache.org
* [HTTP/2] [3] OPENED stream for https://camel.apache.org/components/4.14.x/direct-component.md
* [HTTP/2] [3] [:method: GET]
* [HTTP/2] [3] [:scheme: https]
* [HTTP/2] [3] [:authority: camel.apache.org]
* [HTTP/2] [3] [:path: /components/4.14.x/direct-component.md]
* [HTTP/2] [3] [user-agent: curl/8.7.1]
* [HTTP/2] [3] [accept: text/markdown]
> GET /components/4.14.x/direct-component.md HTTP/2
> Host: camel.apache.org
> User-Agent: curl/8.7.1
> Accept: text/markdown
>
* Request completely sent off
< HTTP/2 200
< server: Apache
< last-modified: Sat, 13 Dec 2025 15:14:42 GMT
< cache-control: max-age=0, no-transform
< expires: Fri, 16 Jan 2026 16:26:56 GMT
< access-control-allow-origin: *
< content-security-policy: default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://www.apachecon.com/ https://www.communityovercode.org/ https://*.apache.org/ https://apache.org/ https://*.scarf.sh/  ; script-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://www.apachecon.com/ https://www.communityovercode.org/ https://*.apache.org/ https://apache.org/ https://*.scarf.sh/  ; style-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://www.apachecon.com/ https://www.communityovercode.org/ https://*.apache.org/ https://apache.org/ https://*.scarf.sh/  ; frame-ancestors 'self'; frame-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://www.apachecon.com/ https://www.communityovercode.org/ https://*.apache.org/ https://apache.org/ https://*.scarf.sh/  ; worker-src 'self' data: blob:;
< x-content-type-options: nosniff
< content-type: text/markdown
< via: 1.1 varnish, 1.1 varnish
< accept-ranges: bytes
< age: 0
< date: Fri, 16 Jan 2026 16:26:56 GMT
< x-served-by: cache-hel1410028-HEL, cache-lin1730039-LIN
< x-cache: MISS, MISS
< x-cache-hits: 0, 0
< x-timer: S1768580816.024850,VS0,VE41
< vary: Accept-Encoding
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< content-length: 11747
<
# Direct

**Since Camel 1.0**

**Both producer and consumer are supported**

The Direct component provides direct, synchronous invocation of any consumers when a producer sends a message exchange. This endpoint can be used to connect existing routes in the **same** camel context.

> **Tip**
> **Asynchronous**
>
> The [SEDA](seda-component.md) component provides asynchronous invocation of any consumers when a producer sends a message exchange.

## URI format

direct:someId\[?options\]
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants