Fixes #4251 - Http 2.0 clients cannot upgrade protocol in 9.4.22 release.

Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2019-10-31 22:24:31 +01:00
parent 4f19e6b638
commit 3ae9faab79
1 changed files with 7 additions and 0 deletions

View File

@ -221,6 +221,13 @@ public class SettingsBodyParser extends BodyParser
return true;
}
/**
* <p>Parses the given buffer containing the whole body of a {@code SETTINGS} frame
* (without header bytes), typically from the {@code HTTP2-Settings} header.</p>
*
* @param buffer the buffer containing the body of {@code SETTINGS} frame
* @return the {@code SETTINGS} frame from the parsed body bytes
*/
public static SettingsFrame parseBody(final ByteBuffer buffer)
{
AtomicReference<SettingsFrame> frameRef = new AtomicReference<>();