Return NGHTTP2_ERR_BUFFER_ERROR from nghttp2_hd_{deflate,inflate}_hd

It is generally useful to know what is the cause of the error.  Since
we expose HPACK API, it is friendly to tell application the
insufficient buffer size is a culprit.
This commit is contained in:
Tatsuhiro Tsujikawa
2014-05-12 21:48:00 +09:00
parent bc6d952361
commit ab76468971
6 changed files with 30 additions and 22 deletions

View File

@@ -286,6 +286,8 @@ int nghttp2_hd_deflate_change_table_size(nghttp2_hd_deflater *deflater,
* Out of memory.
* NGHTTP2_ERR_HEADER_COMP
* Deflation process has failed.
* NGHTTP2_ERR_BUFFER_ERROR
* Out of buffer space.
*/
int nghttp2_hd_deflate_hd(nghttp2_hd_deflater *deflater,
nghttp2_bufs *bufs,