Permalink
Commits on Nov 12, 2010
  1. bump version to 1.4.1

    etrepum committed Nov 12, 2010
Commits on Nov 11, 2010
  1. Merge branch 'pu'

    etrepum committed Nov 11, 2010
  2. 5 minute default idle timeout

    kocolosk committed with etrepum Oct 26, 2010
Commits on Nov 10, 2010
  1. Merge branch 'pu'

    etrepum committed Nov 10, 2010
  2. Merge branch 'master' into pu

    etrepum committed Nov 10, 2010
  3. Added mochiweb_request:accept_content_type/1 function.

    This function allows a caller to know if a request accepts a given media type.
    Examples:
    
          1) For a missing "Accept" header:
             accepts_content_type("application/json") -> true
    
          2) For an "Accept" header with value "text/plain, application/*":
             accepts_content_type("application/json") -> true
    
          3) For an "Accept" header with value "text/plain, */*; q=0.0":
             accepts_content_type("application/json") -> false
    
          4) For an "Accept" header with value "text/plain; q=0.5, */*; q=0.1":
             accepts_content_type("application/json") -> true
    
          5) For an "Accept" header with value "text/*; q=0.0, */*":
             accepts_content_type("text/plain") -> false
    fdmanana committed with etrepum Nov 8, 2010
  4. edoc cleanup

    etrepum committed Nov 10, 2010
  5. Merge branch 'pu'

    etrepum committed Nov 10, 2010
  6. Merge branch 'master' into pu

    etrepum committed Nov 10, 2010
  7. Fix for error in parsing particular incorrect singletons.

    When the HTML parser attempts to parse tags that should be
    singletons but are not, AND they have content, an exception
    occurs:
    
      1> mochiweb_html:parse("<html><input><input>x</input></input></html>").
      ** exception error: no case clause matching
            	            {[],[{<<"input">>,[],[<<"x">>]},{<<"input">>,[],[]}]}
           in function  mochiweb_html:destack/2
           in call from mochiweb_html:tree/2
           in call from mochiweb_html:parse_tokens/1
    
    This patch provides a fix.
    jkoops committed with etrepum Oct 20, 2010
Commits on Nov 9, 2010
Commits on Nov 8, 2010
  1. Added mochiweb_request:accept_content_type/1 function.

    This function allows a caller to know if a request accepts a given media type.
    Examples:
    
          1) For a missing "Accept" header:
             accepts_content_type("application/json") -> true
    
          2) For an "Accept" header with value "text/plain, application/*":
             accepts_content_type("application/json") -> true
    
          3) For an "Accept" header with value "text/plain, */*; q=0.0":
             accepts_content_type("application/json") -> false
    
          4) For an "Accept" header with value "text/plain; q=0.5, */*; q=0.1":
             accepts_content_type("application/json") -> true
    
          5) For an "Accept" header with value "text/*; q=0.0, */*":
             accepts_content_type("text/plain") -> false
    fdmanana committed Nov 8, 2010
Commits on Nov 2, 2010
  1. {active, false} -> {active, once}

    Small refactoring
    doubleyou committed Nov 2, 2010
Commits on Nov 1, 2010
  1. run userdefined profile_fun for accept timing, handle state upgrade, …

    …document and test.
    Emad El-Haraty committed Nov 1, 2010
  2. this is going to be a lot of data, so we need to make sure our networ…

    …k and scribe can handle this
    Emad El-Haraty committed Nov 1, 2010
Commits on Oct 20, 2010
  1. Merge branch 'master' into pu

    etrepum committed Oct 20, 2010
  2. Fix for parsing broken processing instructions.

    Some HTML contains broken processing instructions, such as this one
    encountered in the wild: `<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com🏢office" />`.
    
    The parser crashes on this since it only accepts `?>` (or end-of-file) as
    the end of a processing instruction. This patch fixes it by also
    allowing `>` or `/>` to end a processing instruction.
    jkoops committed with etrepum Oct 15, 2010
Commits on Oct 13, 2010
  1. Merge branch 'pu'

    etrepum committed Oct 13, 2010
  2. Fix for bug when parsing attributes without a name

    There is a bug when parsing HTML tags with attributes wihout a name --
    either because the author forgot to include the attribute's name (it
    happens!) or because they forgot the whitespace between the tagname
    and the attribute-name:
    
    <body ="black">
    or
    <liclass="first">
    
    Parsing this would cause an exit with a function-clause error.
    
    This patch fixes it in such a way that at least the parse succeeds,
    although the parsed attribute-names and values are probably not what was
    intended by the HTML author.
    jkoops committed with etrepum Oct 13, 2010
Commits on Oct 12, 2010
  1. Merge branch 'pu'

    etrepum committed Oct 12, 2010
  2. fix vsn in pu

    etrepum committed Oct 12, 2010
  3. Merge branch 'pu'

    etrepum committed Oct 12, 2010
  4. tag 1.4.0

    etrepum committed Oct 12, 2010
  5. Merge branch 'master' into pu

    etrepum committed Oct 12, 2010
  6. Fixes a bug when parsing an unquoted attribute value starting with a …

    …slash.
    
    For example, parsing <img src=/images/icon.png> would exit with a
    ** exception error: bad argument
         in function  iolist_to_binary/1
                 called as iolist_to_binary({data,"/",false})
    
    The error was introduced by commit d064e45.
    unknown committed with etrepum Oct 11, 2010
Commits on Oct 8, 2010
  1. Merge branch 'pu'

    etrepum committed Oct 8, 2010
  2. This is a fix for mochiweb_html:parse/1 getting in an infinite loop w…

    …hen encountering some sorts of invalid HTML.
    unknown committed with etrepum Oct 4, 2010
Commits on Sep 29, 2010
  1. Merge branch 'pu'

    etrepum committed Sep 29, 2010