http-party / http-server

a simple zero-configuration command-line http server
MIT License
13.42k stars 1.48k forks source link

Fix timeout flag behavior #826

Open elliotwutingfeng opened 1 year ago

elliotwutingfeng commented 1 year ago

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
Maintainer checklist
github-actions[bot] commented 11 months ago

This pull request has been inactive for 360 days