fix(line): accept HEAD probes on webhook endpoint#25726
Closed
stakeswky wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix(line): accept HEAD probes on webhook endpoint#25726stakeswky wants to merge 1 commit intoopenclaw:mainfrom
stakeswky wants to merge 1 commit intoopenclaw:mainfrom
Conversation
18 tasks
|
This pull request has been automatically marked as stale due to inactivity. |
Contributor
|
Superseded by #32546, which consolidates this LINE workstream into the merged canonical fix set. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #25721
Problem
LINE webhook endpoint could return
405 Method Not AllowedforHEADprobes. Some webhook validators / reverse proxies / health checks useHEADinstead ofGET, which can make the webhook look unhealthy.Root Cause
createLineNodeWebhookHandleronly treatedGETas a non-POST verification/probe method.HEADrequests fell through to the generic non-POST branch and returned405withAllow: GET, POST.Fix
HEADrequests on the LINE webhook path as a lightweight probe response (204 No Content)GETprobe support unchanged (200 OK)Allowheader to advertiseGET, HEAD, POSTHEADTesting
pnpm exec vitest run src/line/webhook-node.test.ts src/line/webhook.test.tsGreptile Summary
Added support for
HEADrequests to the LINE webhook endpoint, resolving #25721 where health checks and webhook validators usingHEADinstead ofGETwould receive a405 Method Not Allowedresponse. The implementation correctly returns204 No ContentforHEADrequests (per HTTP spec - no body for HEAD), maintains existingGETsupport (200 OK), and updates theAllowheader to advertise all three supported methods:GET, HEAD, POST. Test coverage includes a regression test for the newHEADbehavior.Confidence Score: 5/5
Last reviewed commit: 3e17498