Skip to content
Branch: master
Commits on Apr 2, 2019
  1. Add http::Error::inner_ref and cause (#303)

    dekellum authored and seanmonstar committed Apr 2, 2019
    * add Error::inner_ref() for access to inner error type
    Also use `Error::inner_ref` to implement `std::error::Error::cause`
    for now. When MSRV is raised to 1.30.0+, this could also be used for
    `Error::source` without a breaking change.
    * add Error::is helper
    * rename Error::inner_ref to get_ref
    * make Error::cause be the inner error's cause
    None of the inner errors currently have a cause, but this is
    considered (see PR discussion) the most correct implementation of
    `std::error::Error::cause` and is thus future proofed.
Commits on Sep 18, 2018
  1. Ignore valid/invalid percent encodings in URI PathAndQuery

    dekellum authored and seanmonstar committed Sep 17, 2018
    Previously the parsing (`from_shared`) checked for hex digits after a
    `%` but the HEX_DIGIT array included additional characters beyond
    valid hex ranges (like 'Z' and '~')
    By comparison the WHATWG URL standard (
    and implementations like the *rust-url* crate simply pass invalid
    percent encodings through unmodified (only treating these as a soft
    SyntaxViolation warning).
    Since `Uri` doesn't attempt any normalization of percent-encoded
    values, simply treat '%' as a valid path or query character,
    with no special meaning for the subsequent characters.  The '%'
    character is *not* added to URI_CHARS because we still don't want to
    accept it, at least in a host name component of the authority.
  2. Revert "Fix path double percent parsing (#233)"

    dekellum authored and seanmonstar committed Sep 17, 2018
    This reverts commit c935888.
    As written, the double percent special case breaks out of the check
    loop, thereby allowing any characters in the path after that point.
You can’t perform that action at this time.