http-server icon indicating copy to clipboard operation
http-server copied to clipboard

Fix timeout flag behavior

Open elliotwutingfeng opened this issue 3 years ago • 1 comments

Fix timeout flag behavior for 0 value, negative value, empty value, and non-numeric value. Add timeout flag description to README.

Example

0 or negative values

-t0 -t-42 -> timeout of 0s (i.e. timeout disabled)

Empty or non-numeric values

-t -t' ' -ta1 -t1a -> reject timeout value as invalid, and hence fallback to default timeout of 120s

Relevant issues

Fixes #804

Contributor checklist
  • [ ] Provide tests for the changes (unless documentation-only)
  • [x] Documented any new features, CLI switches, etc. (if applicable)
    • [x] Server --help output
    • [x] README.md
    • [x] doc/http-server.1 (use the same format as other entries)
  • [x] The pull request is being made against the master branch
Maintainer checklist
  • [ ] Assign a version triage tag
  • [ ] Approve tests if applicable

elliotwutingfeng avatar Aug 08 '22 00:08 elliotwutingfeng

This pull request has been inactive for 360 days

github-actions[bot] avatar Aug 03 '23 12:08 github-actions[bot]