[FFmpeg-trac] #4451(undetermined:new): Accept-Encoding parsing

FFmpeg trac at avcodec.org
Wed Apr 8 07:13:31 CEST 2015


#4451: Accept-Encoding parsing
-------------------------------------+-------------------------------------
             Reporter:  mnot         |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 http.c parses the Accept-Encoding response header like this:

 """
 if (!av_strcasecmp(tag, "Accept-Ranges") &&
                    !strncmp(p, "bytes", 5) &&
                    s->seekable == -1) {
             h->is_streamed = 0;
         } else if (!av_strcasecmp(tag, "Transfer-Encoding") &&
 """

 This means that if the string "bytes" shows up in the header at all, it
 will match -- making it error-prone if a range using that sequence of
 characters is ever defined (e.g., "newbytes" as recently proposed on the
 HTTP WG mailing list).

 The syntax isn't difficult to parse, it's a comma-separated list of tokens
 with optional whitespace (the same as several other headers):
   http://httpwg.github.io/specs/rfc7233.html#header.accept-ranges

 (found by Rodger Combs on the IETF HTTP WG mailing list)

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4451>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list