[FFmpeg-trac] #9020(avformat:new): http BUFFER_SIZE too small

FFmpeg trac at avcodec.org
Tue Mar 23 17:06:50 EET 2021

#9020: http BUFFER_SIZE too small
             Reporter:  jtojnar      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avformat
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |

Comment (by sskras):

 I debbuged the ytdl and found out that in case of my Microsoft Stream
 video it builds 9598 bytes long http header. Here it's structure, broken
 down and simplified:

 Accept-Language: en-us,en;q=0.5
 Accept-Encoding: gzip, deflate
 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
 (KHTML, like Gecko) Chrome/73.0.3683.11 Safari/537.36
 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
 Authorization: Bearer eyJ0<...1692-chars...>

 I found an article about the max. header size support for http requests:

 According to it, only five popular implementations use 8k or lower limit
 for the http header.
 Another five implementations use 16k limit.
 The rests six implementation use 32k or more (up to 2M on IIS 4.x).

 I think it's reasonable to increase the `HTTP_HEADERS_SIZE` to 16k (as is
 seen in my example).

Ticket URL: <https://trac.ffmpeg.org/ticket/9020#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list