Commit 4fa87de
Proxy: Fix HLS proxy response header loss and m3u8 URL query parameter corruption
1. Move WriteHeader() after setting response headers. In Go's
http.ResponseWriter, headers set after WriteHeader() are silently
ignored, which caused all backend response headers (Content-Type,
Cache-Control, etc.) to be lost during HLS proxying.
2. Fix double ampersand (&&) in m3u8 ts URL rewriting. When the
original ts URL already contains query parameters, the proxy
generated malformed URLs like ".ts?spbhid=xxx&&token=abc"
instead of ".ts?spbhid=xxx&token=abc".1 parent 913b773 commit 4fa87de
1 file changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
351 | | - | |
| 350 | + | |
| 351 | + | |
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
357 | 358 | | |
358 | 359 | | |
359 | 360 | | |
| |||
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
479 | | - | |
480 | | - | |
| 480 | + | |
| 481 | + | |
481 | 482 | | |
482 | 483 | | |
483 | 484 | | |
484 | 485 | | |
485 | 486 | | |
| 487 | + | |
486 | 488 | | |
487 | 489 | | |
488 | 490 | | |
| |||
502 | 504 | | |
503 | 505 | | |
504 | 506 | | |
505 | | - | |
| 507 | + | |
506 | 508 | | |
507 | 509 | | |
508 | 510 | | |
| |||
0 commit comments