Opened 4 years ago

Closed 4 years ago

#8907 closed defect (invalid)

"cookies" option doesn't actually send cookie

Reported by: fireattack Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

>ffmpeg -v 99 -cookies "test=blabla;" -i https://del.thumva.com/hls/20200621-0005-05/index_1.m3u8
ffmpeg version git-2020-08-16-5df9724 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.1 (GCC) 20200805
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --enable-libsvtav1 --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 58.100 / 56. 58.100
  libavcodec     58.100.100 / 58.100.100
  libavformat    58. 51.100 / 58. 51.100
  libavdevice    58. 11.101 / 58. 11.101
  libavfilter     7. 87.100 /  7. 87.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '99'.
Reading option '-cookies' ... matched as AVOption 'cookies' with argument 'test=blabla;'.
Reading option '-i' ... matched as input url with argument 'https://del.thumva.com/hls/20200621-0005-05/index_1.m3u8'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 99.
Successfully parsed a group of options.
Parsing a group of options: input url https://del.thumva.com/hls/20200621-0005-05/index_1.m3u8.
Successfully parsed a group of options.
Opening an input file: https://del.thumva.com/hls/20200621-0005-05/index_1.m3u8.
[NULL @ 00000000005f5680] Opening 'https://del.thumva.com/hls/20200621-0005-05/index_1.m3u8' for reading
[https @ 00000000005f7100] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[tcp @ 00000000005fa080] Original list of addresses:
[tcp @ 00000000005fa080] Address 13.225.48.70 port 443
[tcp @ 00000000005fa080] Address 13.225.48.37 port 443
[tcp @ 00000000005fa080] Address 13.225.48.75 port 443
[tcp @ 00000000005fa080] Address 13.225.48.12 port 443
[tcp @ 00000000005fa080] Interleaved list of addresses:
[tcp @ 00000000005fa080] Address 13.225.48.70 port 443
[tcp @ 00000000005fa080] Address 13.225.48.37 port 443
[tcp @ 00000000005fa080] Address 13.225.48.75 port 443
[tcp @ 00000000005fa080] Address 13.225.48.12 port 443
[tcp @ 00000000005fa080] Starting connection attempt to 13.225.48.70 port 443
[tcp @ 00000000005fa080] Successfully connected to 13.225.48.70 port 443
[https @ 00000000005f7100] request: GET /hls/20200621-0005-05/index_1.m3u8 HTTP/1.1
User-Agent: Lavf/58.51.100
Accept: */*
Range: bytes=0-
Connection: close
Host: del.thumva.com
Icy-MetaData: 1


[https @ 00000000005f7100] header='HTTP/1.1 403 Forbidden'
[https @ 00000000005f7100] http_code=403
[https @ 00000000005f7100] HTTP error 403 Forbidden
https://del.thumva.com/hls/20200621-0005-05/index_1.m3u8: Server returned 403 Forbidden (access denied)

You can see there is no cookie in request: GET.

-headers works, though:

>ffmpeg -v 99 -headers "Cookie: test=blabla;" -i https://del.thumva.com/hls/20200621-0005-05/index_1.m3u8
ffmpeg version git-2020-08-16-5df9724 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.1 (GCC) 20200805
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --enable-libsvtav1 --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 58.100 / 56. 58.100
  libavcodec     58.100.100 / 58.100.100
  libavformat    58. 51.100 / 58. 51.100
  libavdevice    58. 11.101 / 58. 11.101
  libavfilter     7. 87.100 /  7. 87.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '99'.
Reading option '-headers' ... matched as AVOption 'headers' with argument 'Cookie: test=blabla;'.
Reading option '-i' ... matched as input url with argument 'https://del.thumva.com/hls/20200621-0005-05/index_1.m3u8'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 99.
Successfully parsed a group of options.
Parsing a group of options: input url https://del.thumva.com/hls/20200621-0005-05/index_1.m3u8.
Successfully parsed a group of options.
Opening an input file: https://del.thumva.com/hls/20200621-0005-05/index_1.m3u8.
[NULL @ 0000000000445700] Opening 'https://del.thumva.com/hls/20200621-0005-05/index_1.m3u8' for reading
[https @ 0000000000446040] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[https @ 0000000000446040] No trailing CRLF found in HTTP header. Adding it.
[tcp @ 000000000044a1c0] Original list of addresses:
[tcp @ 000000000044a1c0] Address 13.225.48.12 port 443
[tcp @ 000000000044a1c0] Address 13.225.48.70 port 443
[tcp @ 000000000044a1c0] Address 13.225.48.75 port 443
[tcp @ 000000000044a1c0] Address 13.225.48.37 port 443
[tcp @ 000000000044a1c0] Interleaved list of addresses:
[tcp @ 000000000044a1c0] Address 13.225.48.12 port 443
[tcp @ 000000000044a1c0] Address 13.225.48.70 port 443
[tcp @ 000000000044a1c0] Address 13.225.48.75 port 443
[tcp @ 000000000044a1c0] Address 13.225.48.37 port 443
[tcp @ 000000000044a1c0] Starting connection attempt to 13.225.48.12 port 443
[tcp @ 000000000044a1c0] Successfully connected to 13.225.48.12 port 443
[https @ 0000000000446040] request: GET /hls/20200621-0005-05/index_1.m3u8 HTTP/1.1
User-Agent: Lavf/58.51.100
Accept: */*
Range: bytes=0-
Connection: close
Host: del.thumva.com
Icy-MetaData: 1
Cookie: test=blabla;


[https @ 0000000000446040] header='HTTP/1.1 403 Forbidden'
[https @ 0000000000446040] http_code=403
[https @ 0000000000446040] HTTP error 403 Forbidden
https://del.thumva.com/hls/20200621-0005-05/index_1.m3u8: Server returned 403 Forbidden (access denied)

Change History (1)

comment:1 by fireattack, 4 years ago

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