Commit 9ffe1fb
committed
fix: support :port format for bind configuration
This commit adds support for the Go-style :port bind syntax (e.g., :80, :8080)
which binds to all interfaces (0.0.0.0) on the specified port.
Changes:
- Updated parse_bind_config() to handle :port format
- Added test_server_bind_colon_prefix_port test
- Updated start_server_with_bind() helper to parse :port format
Now supports all bind formats:
- "80" -> 0.0.0.0:80
- ":80" -> 0.0.0.0:80 (new)
- "127.0.0.1:80" -> 127.0.0.1:80
- "127.0.0.1" -> 127.0.0.1:8080 (server mode default)1 parent 10e3d54 commit 9ffe1fb
2 files changed
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
495 | | - | |
| 495 | + | |
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
| 499 | + | |
| 500 | + | |
499 | 501 | | |
500 | 502 | | |
501 | 503 | | |
502 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
503 | 513 | | |
504 | 514 | | |
505 | 515 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
312 | 315 | | |
313 | 316 | | |
314 | 317 | | |
| |||
344 | 347 | | |
345 | 348 | | |
346 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
347 | 362 | | |
348 | 363 | | |
349 | 364 | | |
| |||
0 commit comments