Commit Graph

119 Commits

Author SHA1 Message Date
Andrew Udvare
b36c2a9ece header: treat Wine like MinGW
PR-URL: https://github.com/joyent/http-parser/pull/259
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-07-22 19:12:02 -07:00
Ivan Enderlin
eb5e9928b4 src: support ACL (WebDAV, RFC3744, Section 8.1).
PR-URL: https://github.com/joyent/http-parser/pull/260
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-07-20 23:30:14 -07:00
Ivan Enderlin
8b1d652322 src: support BIND/REBIND/UNBIND (WebDAV, RFC5842)
Support BIND/REBIND/UNBIND methods, see sections 4, 5, 6 of
RFC5842.

PR-URL: https://github.com/joyent/http-parser/pull/242
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-07-15 20:22:56 -07:00
Fedor Indutny
39c2c1e573 Bump version to 2.5.0 2015-04-24 15:44:31 +02:00
Kjell Schubert
d7675453a6 src: callbacks chunk boundaries: header/complete
(Proxygen fork merge D508755 D521404, orig author simpkins@fb.com)

Fix: #231
PR-URL: https://github.com/joyent/http-parser/pull/233
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-04-23 11:54:47 +02:00
Fedor Indutny
7ba312397c header: fix field sizes
The flags enum does not fit into 6 bits anymore.

Fix: #218
PR-URL: https://github.com/joyent/http-parser/pull/219
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-15 18:26:11 +01:00
Romain Giraud
53063b780b Add function to initialize http_parser_settings
PR-URL: https://github.com/joyent/http-parser/pull/215
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-01-26 14:47:29 +03:00
Fedor Indutny
1b31580893 Bump version to 2.4.2 2015-01-25 21:22:01 +03:00
Fedor Indutny
36f107fa2e Bump version to 2.4.1 2015-01-14 15:59:25 +03:00
Fedor Indutny
956c8a054a Bump version to 2.4.0 2015-01-14 02:49:50 +03:00
Jon Kolb
091ebb8778 src: simple Connection header multi-value parsing
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/http-parser/pull/100
2014-12-05 17:00:06 +03:00
Marc O'Morain
11ecb42061 Docs fix
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-09-09 16:26:45 +01:00
Maciej Małecki
7bbb77467f doc: add very basic docs for http_parser_execute
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-08-24 22:19:49 +04:00
George Miroshnykov
17ed7deb7c header: typo fix in a comment
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-08-22 17:31:34 +04:00
Helge Heß
1317eeca43 Added support for MKCALENDAR
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-27 13:28:56 +04:00
Vinnie Falco
24e2d2d43f Allow HTTP_MAX_HEADER_SIZE to be defined externally 2014-03-17 14:31:29 +04:00
Fedor Indutny
56f7ad0e2e Bump version to 2.3.0 2014-03-13 13:18:11 +04:00
Fedor Indutny
cba704cb2d Bump version to 2.2.1 2014-01-29 03:17:31 +04:00
Fedor Indutny
fd609ab272 Bump version to 2.2 2013-12-20 17:32:41 +04:00
Patrik Stutz
d7b938bdca Parse and emit status message of response 2013-12-19 15:56:06 +04:00
Charlie Somerville
11419c8e41 Use unsigned int as bitfield type. 2013-11-19 12:43:27 +01:00
Ben Noordhuis
d3264312e1 Add function http_parser_version().
Fixes #115.
2013-08-21 02:48:14 +02:00
Ben Noordhuis
6df37aa52d build: set SONAME in shared object file
Fixes #151.
2013-06-13 21:38:32 +02:00
Ben Noordhuis
8081938445 Bump to version 2.1 2013-03-26 23:35:20 +01:00
Tóth Tamás
0938fe599f Add on_status_complete callback.
Add a "status complete" callback to support Simple-Response handling with HTTP
version <= 1.0.

Patch by Tóth Tamás, tests by Corey Richardson.
2012-12-17 14:56:05 +01:00
James McLaughlin
2b77aba93a Fix MSVS 2005 and 2008 missing size_t typdef.
Replace manual size_t typedef with stddef.h include

Fixes #128, #141.
2012-12-12 15:57:23 +01:00
Ben Noordhuis
245f6f0078 Remove HTTP_PARSER_DEBUG macro.
Remove the HTTP_PARSER_DEBUG macro for two reasons:

* It changes the size of struct http_parser, resulting in spurious memory
  corruption bugs if part of your application is built with HTTP_PARSER_DEBUG=1
  and other parts with HTTP_PARSER_DEBUG=0.

* It's a debugging tool for maintainers. It should never have been exposed in
  the API in the first place.
2012-11-10 23:39:34 +01:00
Peter Faiman
b4fc777dc6 fix old references to on_path 2012-10-29 20:31:29 +01:00
Ben Noordhuis
3fb4e061ec Bump to version 2.0 2012-10-10 22:38:20 +02:00
BogDan Vatra
1ca7de5258 Add "int http_body_is_final(const http_parser *parser)" method.
It's useful to check if the current chunk is the last one.
2012-09-01 03:04:48 +02:00
Ben Noordhuis
9f92347851 Make http_should_keep_alive() const correct. 2012-08-29 23:13:16 +02:00
Ben Noordhuis
2b7e87cc77 Fix bad http_should_keep_alive() comment. 2012-07-27 01:34:57 +02:00
Peter Griess
ba5acd532f Merge pull request #104 from simonz05/patch-1
Correct misspelling in http_parser.h
2012-07-24 18:06:54 -07:00
Peter Griess
fb3eeb7d05 Merge pull request #118 from bpaquet/master
#116 : refactor to allow url with basic auth a:b@toto.com
2012-07-24 18:02:19 -07:00
James McLaughlin
8ee3b0dc93 Make size_t and ssize_t Windows typedefs more appropriate 2012-07-16 01:58:31 +02:00
Bertrand Paquet
7965096276 User info implementation 2012-07-08 02:04:12 +02:00
Simon
905e959130 Correct misspelling in http_parser.h 2012-03-19 22:44:48 +01:00
Ben Noordhuis
8bec3ea459 Create method_strings array with HTTP_METHOD_MAP macro. 2012-03-12 02:18:35 +01:00
Nathan Rajlich
a3373d7627 add support for "SEARCH" request methods 2012-03-12 01:51:40 +01:00
Ben Noordhuis
36808f4fad Replace HTTP methods enum with X-macro map.
Makes it easier for integrators to generate bindings for the HTTP methods that
we support. Example:

    // stringify method names
    const char *methods[] = {
    #define XX(num, name) #name,
    HTTP_METHOD_MAP(XX)
    #undef XX
    };
2012-02-27 23:35:49 +01:00
Ben Noordhuis
efb72f175c Remove unused struct http_parser_result from header. 2012-02-26 01:29:53 +01:00
Ben Noordhuis
62110efe7a Support PURGE request method.
Fixes joyent/node#2775.
2012-02-20 16:07:00 +01:00
Randy Rizun
b215eaa749 removed obsolete CB_path, CB_query_string and CB_fragment 2012-02-15 13:34:27 +01:00
Ben Noordhuis
f668e72380 Make content_length unsigned, add overflow checks. 2012-01-27 20:49:29 +01:00
Peter Griess
d0bb867d1b Implement http_parser_pause().
Summary:
- 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
2012-01-08 20:43:35 -06:00
Peter Griess
d7675cd9a6 Add http_parser_parse_url().
- 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.
2012-01-07 16:53:11 -06:00
Ryan Dahl
3cf68f9a70 Fix compilation on MSVC 2008 which doesn't bundle stdint.h
Thanks to Steve Ridout for the patch. Fixes #69.
2011-12-13 09:37:51 -08:00
Ben Noordhuis
75dc103fd0 Single-bit bitfield 'upgrade' should be unsigned.
Fixes sparse error report: dubious one-bit signed bitfield.
2011-08-29 22:33:38 +02:00
Ryan Dahl
965f91bc76 Support MSVS 2011-08-06 02:55:51 -07:00
Fouad Mardini
2b2ba2da1a rename parser->errno to parser->http_errno; conflicts with errno.h where errno is defined as a macro 2011-07-24 18:49:54 +03:00