Skip to content

CLI: -T . / -T - read stdin to EOF up front instead of streaming during the transfer #141

Description

@jonwiggins

curl treats `-T -` as blocking stdin and `-T .` as non-blocking stdin, read incrementally during the transfer (each read chunk becomes an upload chunk; for WebSocket each chunk becomes one BINARY frame). urlx reads stdin to EOF at argument-parse time for both forms, so:

  • `urlx -T . ws://echo.example/` blocks on a terminal stdin before even connecting, where curl connects immediately and sends data as it is typed;
  • interactive/streaming uploads cannot interleave with downloads.

This matches urlx's existing buffered-upload architecture (curl test 2300 passes because its stdin is empty), but a streaming upload source would be needed for full fidelity. Related minor divergence: mixing per-URL `-T file` with `-T .`/`-T -` in multi-URL invocations does not replicate curl's per-URL association exactly (review finding on crates/urlx-cli/src/transfer.rs run_multi).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions