Skip to content

fix: preserve file API text content#37385

Draft
dev-willbird1936 wants to merge 1 commit into
anomalyco:devfrom
dev-willbird1936:preserve-file-content
Draft

fix: preserve file API text content#37385
dev-willbird1936 wants to merge 1 commit into
anomalyco:devfrom
dev-willbird1936:preserve-file-content

Conversation

@dev-willbird1936

Copy link
Copy Markdown

Issue for this PR

Closes #37384

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The instance file API currently calls trim() on decoded text and changes leading, trailing, and blank-line whitespace. This returns the decoded text unchanged while preserving the existing binary and invalid UTF-8 behavior, with HTTP-level regression coverage.

How did you verify your code works?

  • PATH=/home/hermes/.bun/bin:$PATH bun test --timeout 180000 -t 'serves read endpoints' test/server/httpapi-file.test.ts - 1 passed, 1 filtered, 6 assertions
  • bun run typecheck - shared current-base package check reached only unrelated existing errors in src/provider/transform.ts, src/tool/task.ts, and their tests; current hosted CI remains required
  • bunx prettier --check src/server/routes/instance/httpapi/handlers/file.ts test/server/httpapi-file.test.ts - passed
  • git diff --check 1d2a7b4c860f6a29eb90bdda07757b2adf34ab61..HEAD - passed

Screenshots / recordings

Not applicable; this is an HTTP API response-content fix.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.

File API trims decoded text content

1 participant