Ben Noordhuis
ad3b631d4f
Turn normal_url_char into a bit array.
...
Makes http_parser slightly more cache friendly.
12 years ago
Ben Noordhuis
4e1a6ab655
Update AUTHORS
12 years ago
Ben Noordhuis
add3018ce7
Add bounds check to http_method_str().
12 years ago
Ben Noordhuis
9f92347851
Make http_should_keep_alive() const correct.
12 years ago
Ben Noordhuis
2b7e87cc77
Fix bad http_should_keep_alive() comment.
13 years ago
Peter Griess
ba5acd532f
Merge pull request #104 from simonz05/patch-1
...
Correct misspelling in http_parser.h
13 years ago
Peter Griess
fb3eeb7d05
Merge pull request #118 from bpaquet/master
...
#116 : refactor to allow url with basic auth a:b@toto.com
13 years ago
Bertrand Paquet
a828edaf6a
Add a comment
13 years ago
Bertrand Paquet
50faa793f4
Coding style : remove space before ++
13 years ago
Bertrand Paquet
148984cd8d
Rename s_req_host* to be compliant with RFC 2396
13 years ago
Bertrand Paquet
7f1b191d6f
Minor speed improvment
13 years ago
Bertrand Paquet
1d3a0ec752
Use fixed_length printf instead of copying data and do null-termination
13 years ago
Bertrand Paquet
d2ce562338
Use new state instead of pointer
13 years ago
Bertrand Paquet
bb29f43741
Coding style improvment
13 years ago
James McLaughlin
8ee3b0dc93
Make size_t and ssize_t Windows typedefs more appropriate
13 years ago
Bertrand Paquet
e42aa93b52
Add tests
13 years ago
Bertrand Paquet
f6f761596e
Small refactoring, add edge cases
13 years ago
Bertrand Paquet
fe31fe8bf0
Add tests on user info
13 years ago
Bertrand Paquet
7965096276
User info implementation
13 years ago
Bertrand Paquet
ed8475d49f
Refactor host parsing to allow basic auth management
13 years ago
Bertrand Paquet
624a4b44a9
Add url_parser tool
13 years ago
Bertrand Paquet
9dfaa67f2b
Check host on url with hostname:port
13 years ago
Martell Malone
9852e5d048
test: %zu to %lu for msvcrt fixes for Mingw64
13 years ago
Peter Griess
2ec48fd65d
Merge pull request #111 from ErikDubbelboer/master
...
Ignore output of package build
13 years ago
Erik Dubbelboer
4d7b5dcb9a
ignore output of package build
13 years ago
Erik Dubbelboer
4c1e785a04
Merge branch 'master', remote-tracking branch 'upstream/master'
13 years ago
Peter Griess
26f508a289
Merge pull request #110 from ErikDubbelboer/master
...
Ignoring .so files
13 years ago
Erik Dubbelboer
0067f54dbe
Ignoring .so files
13 years ago
Ben Noordhuis
b97fdb0513
Don't assert() on whitespace in URL.
...
Be lenient about tabs and form feeds in non-strict mode.
13 years ago
Simon
905e959130
Correct misspelling in http_parser.h
13 years ago
Ben Noordhuis
8bec3ea459
Create method_strings array with HTTP_METHOD_MAP macro.
13 years ago
Nathan Rajlich
a3373d7627
add support for "SEARCH" request methods
13 years ago
Nathan Rajlich
5a1e556239
test.c: fix off-by-one on the requests test cases
13 years ago
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
};
13 years ago
Ben Noordhuis
99c0850240
test: abort(), don't exit()
...
Makes it easier to debug failing test cases: abort() dumps core and asserts
in a debugger.
13 years ago
Ben Noordhuis
efb72f175c
Remove unused struct http_parser_result from header.
13 years ago
Ben Noordhuis
c6e10e98e3
docs: update links to examples
13 years ago
Andre Louis Caron
9db90de9fc
docs: fix broken URL in README
13 years ago
Ben Noordhuis
f4053c719c
.gitignore gyp build artifacts
13 years ago
Ben Noordhuis
62110efe7a
Support PURGE request method.
...
Fixes joyent/node#2775 .
13 years ago
David Gwynne
662e523a92
fix non-CONNECT tests missing port/hostname bits
...
set is_connect properly
13 years ago
David Gwynne
67568421e9
allow extra ? at the beginning of a query_string.
...
fixes joyent/http-parser issue #25
13 years ago
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.
13 years ago
Ben Noordhuis
7bc668c5f4
Update AUTHORS
13 years ago
Randy Rizun
b215eaa749
removed obsolete CB_path, CB_query_string and CB_fragment
13 years ago
LE ROUX Thomas
f1fe50e0c5
build: add shared libraries target
13 years ago
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.
13 years ago
Ben Noordhuis
c3153bd1a9
Eat CRLF between requests, even on connection:close.
...
Fixes #47 .
13 years ago
Ben Noordhuis
4898606826
Add AUTHORS and .mailmap files.
13 years ago
Ben Noordhuis
89a9da0560
Merge pull request #78 from bnoordhuis/unsigned-content-length
...
Make content_length unsigned, add overflow checks.
13 years ago