Opened 3 years ago

Closed 8 months ago

#9780 closed defect (fixed)

hls uses wrong path separator in DELETE method

Reported by: Peter Holliday Owned by:
Priority: normal Component: avformat
Version: unspecified Keywords: hls
Cc: Peter Holliday Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

When uploading hls segmented video to a web server, the PUT/POST commands are correct but the DELETE method uses a backslash '\' character instead of a forward slash '/' character before the filename.

ffmpeg Command (Win x64):

.\ffmpeg.exe -re -i "Test.mp4" -c:v libx264 -f hls -force_key_frames "expr:gte(t,n_forced*1)" -hls_time 2 -hls_list_size 3 -hls_delete_threshold 2 -hls_allow_cache 1 -hls_segment_type mpegts -hls_flags independent_segments+delete_segments -method PUT http://localhost:5251/hls/out.m3u8

Log from RHEL server (Apache 2.4):
tail -f /var/log/httpd/access.log
192.168.117.1 - - [12/May/2022:10:40:44 +1000] "PUT /hls/out.m3u8 HTTP/1.1"
192.168.117.1 - - [12/May/2022:10:40:54 +1000] "PUT /hls/out5.ts HTTP/1.1"
192.168.117.1 - - [12/May/2022:10:40:54 +1000] "DELETE /hls%5Cout0.ts HTTP/1.1"
192.168.117.1 - - [12/May/2022:10:40:54 +1000] "PUT /hls/out.m3u8 HTTP/1.1"

Log from Windows Kestrel server:

Information: Request is PUT /hls/out5.ts
Information: Request is DELETE /hls\out0.ts
Information: Request is PUT /hls/out.m3u8

I have not tried Linux ffmpeg executable, but it appears the Win version is using a windows file separator instead of the conventional forward slash for http.

Change History (5)

comment:1 by Carl Eugen Hoyos, 2 years ago

Component: undeterminedavformat
Keywords: hls added

comment:2 by OTV, 21 months ago

Same problem. Did you find the issue?

comment:3 by Peter Holliday, 21 months ago

Haven”t gone through the ffmpeg code (don”t have the time). I wrote my own middleware to intercept the request and fix the problem on my side.

comment:4 by guesdo, 9 months ago

I'm getting the same issue; I have tested in Linux and Mac and its only happening in the Windows version.

comment:5 by Marton Balint, 8 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.