Skip to content

fix(line): accept HEAD probes on webhook endpoint#25726

Closed
stakeswky wants to merge 1 commit intoopenclaw:mainfrom
stakeswky:fix/25721
Closed

fix(line): accept HEAD probes on webhook endpoint#25726
stakeswky wants to merge 1 commit intoopenclaw:mainfrom
stakeswky:fix/25721

Conversation

@stakeswky
Copy link

@stakeswky stakeswky commented Feb 24, 2026

Closes #25721

Problem

LINE webhook endpoint could return 405 Method Not Allowed for HEAD probes. Some webhook validators / reverse proxies / health checks use HEAD instead of GET, which can make the webhook look unhealthy.

Root Cause

createLineNodeWebhookHandler only treated GET as a non-POST verification/probe method. HEAD requests fell through to the generic non-POST branch and returned 405 with Allow: GET, POST.

Fix

  • Accept HEAD requests on the LINE webhook path as a lightweight probe response (204 No Content)
  • Keep GET probe support unchanged (200 OK)
  • Update Allow header to advertise GET, HEAD, POST
  • Add regression test coverage for HEAD

Testing

  • pnpm exec vitest run src/line/webhook-node.test.ts src/line/webhook.test.ts
  • Result: 2 test files passed, 15 tests passed

Greptile Summary

Added support for HEAD requests to the LINE webhook endpoint, resolving #25721 where health checks and webhook validators using HEAD instead of GET would receive a 405 Method Not Allowed response. The implementation correctly returns 204 No Content for HEAD requests (per HTTP spec - no body for HEAD), maintains existing GET support (200 OK), and updates the Allow header to advertise all three supported methods: GET, HEAD, POST. Test coverage includes a regression test for the new HEAD behavior.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is well-scoped, logically correct, and properly tested. The implementation follows HTTP specifications (204 for HEAD), maintains backward compatibility with existing GET/POST handlers, and includes regression test coverage. The fix addresses a real operational issue without introducing new complexity or risk.
  • No files require special attention

Last reviewed commit: 3e17498

@openclaw-barnacle
Copy link

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle bot added the stale Marked as stale due to inactivity label Mar 3, 2026
@Takhoffman
Copy link
Contributor

Superseded by #32546, which consolidates this LINE workstream into the merged canonical fix set.

@Takhoffman Takhoffman closed this Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XS stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]:

2 participants