Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis pull request refactors content disposition handling in both server-fetch and server-node packages. It updates tests to spy on and verify calls to new utility functions for generating and extracting content disposition headers and filenames. The changes adjust file upload test cases to handle JSON content and missing filenames with a default value. Additionally, the implementation files now import in‐house utilities instead of external ones, and the expected headers have been updated to include UTF-8 encoded parameters. A dependency on an external content disposition package has been removed. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant ServerFunction
participant Utils
Client->>ServerFunction: Submit file with content-disposition header
ServerFunction->>Utils: getFilenameFromContentDisposition(header)
Utils-->>ServerFunction: Return extracted filename (or undefined)
alt Filename exists
ServerFunction->>Client: Use extracted filename in response
else
ServerFunction->>Utils: generateContentDisposition('blob')
Utils-->>ServerFunction: Return generated header
ServerFunction->>Client: Return response with default filename
end
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (8)
🧰 Additional context used🧬 Code Definitions (3)packages/standard-server/src/utils.test.ts (1)
packages/standard-server-fetch/src/body.test.ts (2)
packages/standard-server-node/src/body.ts (4)
🔇 Additional comments (30)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
More templates
@orpc/arktype
@orpc/client
@orpc/openapi
@orpc/openapi-client
@orpc/contract
@orpc/react
@orpc/react-query
@orpc/server
@orpc/shared
@orpc/solid-query
@orpc/standard-server
@orpc/standard-server-fetch
@orpc/standard-server-node
@orpc/svelte-query
@orpc/valibot
@orpc/vue-colada
@orpc/vue-query
@orpc/zod
commit: |
Summary by CodeRabbit