Skip to content

Handle invalid URLs in content type detection#1998

Open
hiSandog wants to merge 1 commit into
jackwener:mainfrom
hiSandog:fix/opencli-small-fix-20260622
Open

Handle invalid URLs in content type detection#1998
hiSandog wants to merge 1 commit into
jackwener:mainfrom
hiSandog:fix/opencli-small-fix-20260622

Conversation

@hiSandog

Copy link
Copy Markdown
Contributor

Summary:

  • Return binary from detectContentType when URL parsing fails instead of throwing.
  • Add regression coverage alongside the existing requiresYtdlp invalid-URL case.

Validation:

  • ./node_modules/.bin/vitest run --project unit src/download/index.test.ts
  • npm run typecheck
  • git diff --check

Note: the first sandboxed vitest attempt failed because loopback server binding was denied with listen EPERM; rerunning the same test command with elevated permissions passed.

wearzdk added a commit to wearzdk/OpenCLI that referenced this pull request Jun 26, 2026
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.

1 participant