• Barry Warsaw's avatar
    Anthony Baxter's patch for non-strict parsing. This adds a `strict' · f6caeba0
    Barry Warsaw authored
    argument to the constructor -- defaulting to true -- which is
    different than Anthony's approach of using global state.
    
    parse(), parsestr(): Grow a `headersonly' argument which stops parsing
    once the header block has been seen, i.e. it does /not/ parse or even
    read the body of the message.  This is used for parsing message/rfc822
    type messages.
    
    We need test cases for the non-strict parsing.  Anthony will supply
    these.
    
    _parsebody(): We can get rid of the isdigest end-of-line kludges,
    although we still need to know if we're parsing a multipart/digest so
    we can set the default type accordingly.
    f6caeba0
Parser.py 10.3 KB