Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Commits on Feb 14, 2012
Commits on Feb 13, 2012
  1. @thomaslim @bnoordhuis

    build: add shared libraries target

    thomaslim authored bnoordhuis committed
Commits on Feb 9, 2012
  1. @dgwynne @bnoordhuis

    Fix http_parser_parse_url for urls like "http://host/path".

    dgwynne authored bnoordhuis committed
    Before this change it would include the last slash in the separator between the
    schema and host as part of the host. we cant use the trick used for skipping the
    separator before ports, query strings, and fragments because if it was a CONNECT
    style url string (host:port) it would skip the first character of the hostname.
    Work around this by introducing a few more states to represent these separators
    in a url differently to what theyre separating. this in turn lets us simplify
    the url parsing so can simply skip what it considers delimiters rather than
    having to special case certain types of url parts and skip their prefixes.
    Add tests for the http_parser_parse_url().
    This compares the http_parser_url struct that http_parser_parse_url()
    produces against one that we expect from the test. If they differ
    then http_parser_parse_url() misbehaved.
  2. @bnoordhuis
Commits on Jan 27, 2012
  1. @bnoordhuis
  2. @bnoordhuis

    Merge pull request #78 from bnoordhuis/unsigned-content-length

    bnoordhuis authored
    Make content_length unsigned, add overflow checks.
  3. @bnoordhuis
  4. @udp @bnoordhuis

    Use "" instead of <> for the http_parser.h include.

    udp authored bnoordhuis committed
    This avoids having to specify -I when building.
  5. @bnoordhuis

    Don't use 'inline'.

    bnoordhuis authored
    'inline' is not a recognized C89 keyword, it made the build fail with strict or
    older compilers (msvc 2008, gcc with -std=c89).
    'inline' is also just a hint, one that gcc 4.4.3 in this particular case happily
    ignored. Ergo, remove it.
  6. @bnoordhuis

    Merge pull request #82 from ivosh/master

    bnoordhuis authored
    http_parser_init does not clear status_code
  7. @ivosh @bnoordhuis

    http_parser_init does not clear status_code

    ivosh authored bnoordhuis committed
Commits on Jan 22, 2012
  1. @bnoordhuis

    Merge pull request #77 from AndreLouisCaron/compile-fix

    bnoordhuis authored
    Fixes build on MSVC.
Commits on Jan 21, 2012
  1. @AndreLouisCaron

    Fixes build on MSVC.

    AndreLouisCaron authored
Commits on Jan 13, 2012
  1. @pgriess

    Merge pull request #73 from pgriess/http-10-message-length

    pgriess authored
    Get HTTP/1.1 message length logic working for HTTP/1.0
Commits on Jan 9, 2012
  1. @pgriess

    Merge pull request #55 from pgriess/pause

    pgriess authored
    RFC: Implement http_pause()
  2. @pgriess

    Implement http_parser_pause().

    pgriess authored
    - Add http_parser_pause() API. A callback may invoke this at any time.
      This will cause http_parser_parse() to return indicating that it
      parsed less than the number of requested bytes and set an error to
      HBE_PAUSED. A paused parser with fail with HBE_PAUSED until it is
      un-paused with http_parser_pause().
    - Stop using 'state', 'header_state', 'index', and 'nread' shadow
      variables and then updating their http_parser fields when we're done.
      Instead, update the live values as we go. This will make it possible
      to return from anywhere in the parser (say, due to EPAUSED) and have
      valid/expected state.
    - Update state before making callbacks so that if the want to pause,
      we'll know the correct state already.
    - Make sure that every callback has a state that uniquely identifies the
      next step so that we can resume in the right place if we were suppoed
      to be paused.
    - Clean and re-factor up CALLBACK() macros.
    - Use CALLBACK() macros for (almost) all callbacks; on_headers_complete
      is still a special case. This includes on_body which we used to invoke
      manually with a long run of bytes. We now use a 'body' mark and hit
      its callback just like every other data callback.
    - Clean up (most) gotos and replace with real states.
    - Add some unit tests.
    Fixes #70
Commits on Jan 7, 2012
  1. @pgriess

    Don't wait for EOF on 0-length KA messages.

    pgriess authored
    - Break EOF handling out of http_should_keep_alive() into
      http_message_needs_eof(), which we now use when determining what to do
      with a message of unknown length. This prevents us from falling into
      the s_body_identity_eof state in the cases where we actually *do* know
      the length of the message (e.g. because the response status was 204).
  2. @pgriess

    Get HTTP/1.1 message length logic working for HTTP/1.0

    pgriess authored
    - Port message length logic from #72 to HTTP/1.0.
    - Add a bunch of unit tests for handling 0-length messages.
  3. @pgriess

    Merge pull request #58 from pgriess/parse_url

    pgriess authored
    Add http_parser_parse_url().
  4. @pgriess

    Add http_parser_parse_url().

    pgriess authored
    - Add an http_parser_parse_url() method to parse a URL into its
      constituent components. This uses the same underlying parser
      as http_parser_parse() and doesn't do any data copies.
    - Re-add the URL components in various test.c structures; validate
      them when parsing.
Commits on Jan 6, 2012
  1. @pgriess

    Merge pull request #64 from pgriess/i13

    pgriess authored
    Remove some chars from tokens[] per RFC.
  2. @pgriess

    Remove some chars from tokens[] per RFC.

    pgriess authored
    - Treat ' ' specially, as apparently IIS6.0 can send this in headers.
      Allow this character through if we're not in strict mode.
    - Move some test code around so that test indices don't break when
      HTTP_PARSER_STRICT changes.
    Fixes #13.
  3. @koichik @ry

    Fix response body is not read

    koichik authored ry committed
    With HTTP/1.1, if neither Content-Length nor Transfer-Encoding is present,
    section 4.4 of RFC 2616 suggests http-parser needs to read a response body
    until the connection is closed (except the response must not include a body)
    See also joyent/node#2457.
    Fixes #72
Commits on Dec 13, 2011
  1. @ry

    Fix compilation on MSVC 2008 which doesn't bundle stdint.h

    ry authored
    Thanks to Steve Ridout for the patch. Fixes #69.
Commits on Nov 22, 2011
  1. @felixge @ry

    Accept HTTP/0.9 responses

    felixge authored ry committed
Commits on Oct 2, 2011
  1. @pquerna
Commits on Aug 29, 2011
  1. @clifffrey

    Merge pull request #61 from bnoordhuis/master

    clifffrey authored
    Single-bit bitfield 'upgrade' should be unsigned.
  2. @bnoordhuis

    Single-bit bitfield 'upgrade' should be unsigned.

    bnoordhuis authored
    Fixes sparse error report: dubious one-bit signed bitfield.
Commits on Aug 7, 2011
  1. @ry

    Peter Bright's VC fixes

    ry authored
Commits on Aug 6, 2011
  1. @ry

    Support MSVS

    ry authored
  2. @ry
Commits on Jul 24, 2011
  1. @pgriess

    Merge pull request #57 from fmardini/master

    pgriess authored
    A struct member rename for compatibility with errno.h
  2. @fmardini

    rename parser->errno to parser->http_errno; conflicts with errno.h wh…

    fmardini authored
    …ere errno is defined as a macro
Commits on Jul 20, 2011
  1. @pgriess
  2. @pgriess

    Merge pull request #54 from pgriess/path-query-frag-callbacks

    pgriess authored
    API CHANGE: Remove path, query, fragment CBs.
Something went wrong with that request. Please try again.