11.07.2015 Views

Network Working Group R. Fielding Request for Comments: 2616 ...

Network Working Group R. Fielding Request for Comments: 2616 ...

Network Working Group R. Fielding Request for Comments: 2616 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Elements separated by a bar ("|") are alternatives, e.g., "yes |no" will accept yes or no.(rule1 rule2)Elements enclosed in parentheses are treated as a single element.Thus, "(elem (foo | bar) elem)" allows the token sequences "elemfoo elem" and "elem bar elem".*ruleThe character "*" preceding an element indicates repetition. Thefull <strong>for</strong>m is "*element" indicating at least and at most occurrences of element. Default values are 0 and infinity sothat "*(element)" allows any number, including zero; "1*element"requires at least one; and "1*2element" allows one or two.[rule]Square brackets enclose optional elements; "[foo bar]" isequivalent to "*1(foo bar)".<strong>Fielding</strong>, et al. Standards Track [Page 14]RFC <strong>2616</strong> HTTP/1.1 June 1999N ruleSpecific repetition: "(element)" is equivalent to"*(element)"; that is, exactly occurrences of (element).Thus 2DIGIT is a 2-digit number, and 3ALPHA is a string of threealphabetic characters.#ruleA construct "#" is defined, similar to "*", <strong>for</strong> defining lists ofelements. The full <strong>for</strong>m is "#element" indicating at least and at most elements, each separated by one or more commas(",") and OPTIONAL linear white space (LWS). This makes the usual<strong>for</strong>m of lists very easy; a rule such as( *LWS element *( *LWS "," *LWS element ))can be shown as1#elementWherever this construct is used, null elements are allowed, but donot contribute to the count of elements present. That is,"(element), , (element) " is permitted, but counts as only twoelements. There<strong>for</strong>e, where at least one element is required, atleast one non-null element MUST be present. Default values are 0and infinity so that "#element" allows any number, including zero;"1#element" requires at least one; and "1#2element" allows one ortwo.; comment

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!