Repository navigation
fix(generate-code): double cookie in generate code when libcurl is selected - #9271
sachin-thakur-bruno merged 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe snippet generator renames a cookie-header helper parameter without changing behavior. New tests cover lowercase cookie renaming and merging for C/libcurl output. ChangesCookie Header Handling
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to This change is described as renaming a cookie-header parameter and adding libcurl test coverage for cookie casing and merging. No verified defect was established against the current code, so there is no concrete blocking risk identified for merge at this time. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Cookie names align in the stream Comment |
Description
The C/libcurl snippet generator add the Cookie header twice: once through CURLOPT_HTTPHEADER and again through CURLOPT_COOKIE.
BRU-4549
Problem
This was caused by HTTPSnippet’s case-sensitive handling of the cookie header.
Fix
Added
isLibcurlcheck (target === 'c' && client === 'libcurl') alongside the existing isCurl check, so both targets now get the cookie header renamed to Cookie before being handed to HTTPSnippet.Added libcurl tests to cover duplicate cookies, casing, special characters, and cookie merging.
Screenshots
Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.
Summary by CodeRabbit
Cookieheader casing.