Ben Noordhuis
303c4e46c4
Further request method check strengthening.
2013-08-21 03:32:09 +02:00
Chris Dickinson
ddfa1b3ee3
Do not accept PUN/GEM methods as PUT/GET.
...
* Encountering them returns an error, `HPE_INVALID_METHOD`
* Tests have been added.
2013-08-21 02:54:09 +02:00
Ben Noordhuis
ad3b631d4f
Turn normal_url_char into a bit array.
...
Makes http_parser slightly more cache friendly.
2012-08-30 00:04:09 +02:00
Ben Noordhuis
4e1a6ab655
Update AUTHORS
2012-08-29 23:26:25 +02:00
Ben Noordhuis
add3018ce7
Add bounds check to http_method_str().
2012-08-29 23:22:53 +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
Bertrand Paquet
a828edaf6a
Add a comment
2012-07-25 00:36:04 +02:00
Bertrand Paquet
50faa793f4
Coding style : remove space before ++
2012-07-25 00:20:03 +02:00
Bertrand Paquet
148984cd8d
Rename s_req_host* to be compliant with RFC 2396
2012-07-25 00:16:53 +02:00
Bertrand Paquet
7f1b191d6f
Minor speed improvment
2012-07-25 00:13:54 +02:00
Bertrand Paquet
1d3a0ec752
Use fixed_length printf instead of copying data and do null-termination
2012-07-25 00:12:40 +02:00
Bertrand Paquet
d2ce562338
Use new state instead of pointer
2012-07-17 08:48:46 +02:00
Bertrand Paquet
bb29f43741
Coding style improvment
2012-07-17 08:37:39 +02:00
James McLaughlin
8ee3b0dc93
Make size_t and ssize_t Windows typedefs more appropriate
2012-07-16 01:58:31 +02:00
Bertrand Paquet
e42aa93b52
Add tests
2012-07-08 16:06:22 +02:00
Bertrand Paquet
f6f761596e
Small refactoring, add edge cases
2012-07-08 11:58:18 +02:00
Bertrand Paquet
fe31fe8bf0
Add tests on user info
2012-07-08 02:04:16 +02:00
Bertrand Paquet
7965096276
User info implementation
2012-07-08 02:04:12 +02:00
Bertrand Paquet
ed8475d49f
Refactor host parsing to allow basic auth management
2012-07-08 02:04:07 +02:00
Bertrand Paquet
624a4b44a9
Add url_parser tool
2012-07-08 02:02:12 +02:00
Bertrand Paquet
9dfaa67f2b
Check host on url with hostname:port
2012-07-07 22:56:14 +02:00
Martell Malone
9852e5d048
test: %zu to %lu for msvcrt fixes for Mingw64
2012-06-09 19:34:39 +02:00
Peter Griess
2ec48fd65d
Merge pull request #111 from ErikDubbelboer/master
...
Ignore output of package build
2012-05-15 06:17:22 -07:00
Erik Dubbelboer
4d7b5dcb9a
ignore output of package build
2012-05-12 11:32:51 +02:00
Erik Dubbelboer
4c1e785a04
Merge branch 'master', remote-tracking branch 'upstream/master'
2012-05-12 11:31:29 +02:00
Peter Griess
26f508a289
Merge pull request #110 from ErikDubbelboer/master
...
Ignoring .so files
2012-05-06 15:34:00 -07:00
Erik Dubbelboer
0067f54dbe
Ignoring .so files
2012-05-05 17:35:30 +02:00
Ben Noordhuis
b97fdb0513
Don't assert() on whitespace in URL.
...
Be lenient about tabs and form feeds in non-strict mode.
2012-04-23 15:33:57 +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
Nathan Rajlich
5a1e556239
test.c: fix off-by-one on the requests test cases
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
99c0850240
test: abort(), don't exit()
...
Makes it easier to debug failing test cases: abort() dumps core and asserts
in a debugger.
2012-02-27 14:00:29 +01:00
Ben Noordhuis
efb72f175c
Remove unused struct http_parser_result from header.
2012-02-26 01:29:53 +01:00
Ben Noordhuis
c6e10e98e3
docs: update links to examples
2012-02-24 12:53:18 +01:00
Andre Louis Caron
9db90de9fc
docs: fix broken URL in README
2012-02-24 12:52:56 +01:00
Ben Noordhuis
f4053c719c
.gitignore gyp build artifacts
2012-02-23 01:10:05 +01:00
Ben Noordhuis
62110efe7a
Support PURGE request method.
...
Fixes joyent/node#2775 .
2012-02-20 16:07:00 +01:00
David Gwynne
662e523a92
fix non-CONNECT tests missing port/hostname bits
...
set is_connect properly
2012-02-19 00:22:29 +01:00
David Gwynne
67568421e9
allow extra ? at the beginning of a query_string.
...
fixes joyent/http-parser issue #25
2012-02-19 00:22:26 +01:00
David Gwynne
8da60bc423
implement parsing of v6 addresses and rejection of 0-length host and ports.
...
the v6 parsing works by adding extra states for working with the
[] notation for v6 addresses. hosts and ports cannot be 0-length
because we url parsing from ending when we expect those fields to
begin.
http_parser_parse_url gets a free check for the correctness of
CONNECT urls (they can only be host:port).
this addresses the following issues:
i was bored and had my head in this space.
2012-02-18 02:01:49 +01:00
Ben Noordhuis
7bc668c5f4
Update AUTHORS
2012-02-15 13:59:05 +01:00
Randy Rizun
b215eaa749
removed obsolete CB_path, CB_query_string and CB_fragment
2012-02-15 13:34:27 +01:00
LE ROUX Thomas
f1fe50e0c5
build: add shared libraries target
2012-02-13 17:46:20 +01:00
David Gwynne
0499525110
Fix http_parser_parse_url for urls like " http://host/path ".
...
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.
2012-02-09 22:28:22 +01:00
Ben Noordhuis
c3153bd1a9
Eat CRLF between requests, even on connection:close.
...
Fixes #47 .
2012-02-09 22:27:05 +01:00