HTTP2 DATA frames with 0 length

Valentin V. Bartenev vbart at nginx.com
Fri Sep 1 20:32:26 UTC 2017


On пятница, 1 сентября 2017 г. 19:59:04 MSK Muhui Jiang wrote:
> Hi
> 
> I am using nginx 1.9.15. I noticed when I made a HTTP2 request to the
> nginx. It will send the data frames that carry the object first. But end
> with a data frame whose length is zero indicating the Data end flag.
> 
> I am curious why you guys design in this way. I think we don't need this
> extra data frame. Maybe nginx has already fix this, If so, could you tell
> me the exact version.. Many Thanks
> 

Request processing in nginx is quite complex.  There may have many data 
sources, modules, filter modules, and so on.  The HTTP/2 module works quite 
straightforward, if it sees the end of buffer chain in nginx, it adds the 
END_STREAM flag.  Otherwise, it doesn't.

So, whether you see END_STREAM in a separate DATA frame or not depends on
many factors and your configuration.

  wbr, Valentin V. Bartenev



More information about the nginx mailing list