From 1b1239ad51711aeaed722adbd7857f66fdda2fdb Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Thu, 6 Aug 2020 17:18:26 +0200 Subject: [PATCH] Add examples for collect an HTTP quoted string And remove a confusing note. Closes #1068. --- fetch.bs | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/fetch.bs b/fetch.bs index c9e1e6aa4..8eaf33820 100644 --- a/fetch.bs +++ b/fetch.bs @@ -307,9 +307,31 @@ and optionally an extract-value flag, run these steps: inclusive, within input. -

The extract-value flag argument makes this algorithm suitable -for getting, decoding, and splitting and parse a MIME type, as well -as other header value parsers that might need this. +

+ + + + + +
Input + Output + Output with the extract-value flag set + Final position variable value +
""\" + ""\" + "\" + 2 +
""Hello" World" + ""Hello"" + "Hello" + 7 +
""Hello \\ World\""" + ""Hello \\ World\""" + "Hello \ World"" + 18 +
+

The position variable always starts at 0 in these examples. +

Methods