org.apache.tomcat.util.http.parser

## Class HttpParser

- java.lang.Object
- - org.apache.tomcat.util.http.parser.HttpParser

-     public class HttpParser
      extends Object

  HTTP header value parser implementation. Parsing HTTP headers as per RFC2616 is not always as simple as it first appears. For headers that only use tokens the simple approach will normally be sufficient. However, for the other headers, while simple code meets 99.9% of cases, there are often some edge cases that make things far more complicated. The purpose of this parser is to let the parser worry about the edge cases. It provides tolerant (where safe to do so) parsing of HTTP header values assuming that wrapped header lines have already been unwrapped. (The Tomcat header processing code does the unwrapping.)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpParser()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `isHex(int c)`
    `static boolean` | `isHttpProtocol(int c)`
    `static boolean` | `isNotRequestTarget(int c)`
    `static boolean` | `isToken(int c)`
    `static String` | `unquote(String input)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HttpParser

          public HttpParser()

  - ### Method Detail

    - #### unquote

          public static String unquote(String input)

    - #### isToken

          public static boolean isToken(int c)

    - #### isHex

          public static boolean isHex(int c)

    - #### isNotRequestTarget

          public static boolean isNotRequestTarget(int c)

    - #### isHttpProtocol

          public static boolean isHttpProtocol(int c)

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.