Commit 15b8e7e0 authored by Jérémy Lal's avatar Jérémy Lal

Imported Upstream version 0.6.5

parent 2aa8cfbf
......@@ -34,3 +34,5 @@ ipch/
*-nodegyp*
/gyp-mac-tool
/dist-osx
/npm.wxs
/tools/msvs/npm.wixobj
2011.11.18, Version 0.6.2 (stable)
2011.12.04, Version 0.6.5 (stable)
* doc improvements (Artur Adib, Trevor Burnham, Ryan Emery, Trent Mick)
* npm workaround Windows antivirus software (isaacs)
* timers: remember extra setTimeout() arguments when timeout==0
* Upgrade V8 to 3.6.6.11
* punycode: use Mathias Bynens's punycode library, it's more compliant
* repl: improved tab completion (Ryan Emery)
2011.12.02, Version 0.6.4 (stable), 9170077f13e5e5475b23d1d3c2e7f69bfe139727
* buffer: fix range checks in .writeInt() functions (Lukasz Walukiewicz)
* doc improvements (Kyle Young, Tim Oxley, Roman Shtylman, Mathias Bynens)
* tls: make cipher list configurable
* upgrade bundled npm (Isaac Schlueter)
* addons: make Buffer and ObjectWrap visible to Windows add-ons (Bert Belder)
* polish Windows installer (Igor Zinkovsky, Isaac Schlueter)
* crypto: add PKCS#1 a.k.a RSA public key verification support
* punycode: upgrade to v0.2.1 (Mathias Bynens)
* windows: fix stdout writes when redirected to nul
* build: add –without-npm flag to configure script
* sunos: fix build on Solaris and Illumos
* sys: deprecate module some more, print stack trace if NODE_DEBUG=sys
* Upgrade V8 to 3.6.6.8
* cli: add -p switch, prints result of –eval
* #1997: fix Blowfish ECB encryption and decryption (Ingmar Runge)
2011.11.11, Version 0.6.1 (stable)
* #2223: fix socket ‘close’ event being emitted twice
* #2224: fix RSS memory usage > 4 GB reporting (Russ Bradberry)
* #2225: fix util.inspect() object stringification bug (Nathan Rajlich)
2011.11.25, Version 0.6.3 (stable), b159c6d62e5756d3f8847419d29c6959ea288b56
* #2083 Land NPM in Node. It is included in packages/installers and installed
on `make install`.
* #2076 Add logos to windows installer.
* #1711 Correctly handle http requests without headers. (Ben Noordhuis,
Felix Geisendörfer)
* TLS: expose more openssl SSL context options and constants. (Ben Noordhuis)
* #2177 Windows: don't kill UDP socket when a packet fails to reach its
destination. (Bert Belder)
* Windows: support paths longer than 260 characters. (Igor Zinkovsky)
* Windows: correctly resolve drive-relative paths. (Bert Belder)
* #2166 Don't leave file descriptor open after lchmod. (Isaac Schlueter)
* #2084 Add OS X .pkg build script to make file.
* #2160 Documentation improvements. (Ben Noordhuis)
2011.11.18, Version 0.6.2 (stable), a4402f0b2e410b19375a1d5c5fb7fe7f66f3c7f8
* doc improvements (Artur Adib, Trevor Burnham, Ryan Emery, Trent Mick)
* timers: remember extra setTimeout() arguments when timeout==0
* punycode: use Mathias Bynens's punycode library, it's more compliant
* repl: improved tab completion (Ryan Emery)
* buffer: fix range checks in .writeInt() functions (Lukasz Walukiewicz)
* tls: make cipher list configurable
* addons: make Buffer and ObjectWrap visible to Windows add-ons (Bert Belder)
* crypto: add PKCS#1 a.k.a RSA public key verification support
* windows: fix stdout writes when redirected to nul
* sunos: fix build on Solaris and Illumos
* Upgrade V8 to 3.6.6.8
2011.11.11, Version 0.6.1 (stable), 170f2addb2dd0c625bc4a6d461e89a31ad68b79b
* doc improvements (Eric Lovett, Ben Noordhuis, Scott Anderson, Yoji SHIDARA)
......@@ -114,7 +172,7 @@
* Documentation improvments (Igor Zinkovsky, Bert Belder, Ilya Dmitrichenko,
koichik, Maciej Małecki, Guglielmo Ferri, isaacs)
* Performance improvements (Daniel Ennis, Bert Belder, Ben Noordhuis)
* Performance improvements (Daniel Ennis, Bert Belder, Ben Noordhuis)
* Long process.title support (Ben Noordhuis)
......@@ -370,7 +428,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)
* Fixes https host header default port handling. (Mikeal Rogers)
* #1440 strip byte order marker when loading *.js and *.json files
* #1440 strip byte order marker when loading *.js and *.json files
(Ben Noordhuis)
* #1434 Improve util.format() compatibility with browser. (Koichi Kobayashi)
......@@ -581,9 +639,9 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)
* #829 Backport r8577 from V8 (Ben Noordhuis)
* #877 Don't wait for HTTP Agent socket pool to establish connections.
* #877 Don't wait for HTTP Agent socket pool to establish connections.
* #915 Find kqueue on FreeBSD correctly (Brett Kiefer)
* #915 Find kqueue on FreeBSD correctly (Brett Kiefer)
* #1085 HTTP: Fix race in abort/dispatch code (Stefan Rusu)
......@@ -980,7 +1038,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)
* HTTPS server
* Built in debugger 'node debug script.js'
* Built in debugger 'node debug script.js'
* realpath files during module load (Mihai Călin Bazon)
......@@ -1122,7 +1180,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)
* fs bugfixes (Tj Holowaychuk, Tobie Langel, Marco Rogers, isaacs)
* http bug fixes (Fedor Indutny, Mikeal Rogers)
* http bug fixes (Fedor Indutny, Mikeal Rogers)
* Faster buffers; breaks C++ API (Tim-Smart, Stéphan Kochen)
......@@ -1291,7 +1349,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)
* Upgrade http-parser, V8 to 2.2.21
2010.06.21, Version 0.1.99, a620b7298f68f68a855306437a3b60b650d61d78
2010.06.21, Version 0.1.99, a620b7298f68f68a855306437a3b60b650d61d78
* Datagram sockets (Paul Querna)
......@@ -1397,7 +1455,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)
2010.05.06, Version 0.1.94, f711d5343b29d1e72e87107315708e40951a7826
* Look in /usr/local/lib/node for modules, so that there's a way
* Look in /usr/local/lib/node for modules, so that there's a way
to install modules globally (Issac Schlueter)
* SSL improvements (Rhys Jones, Paulo Matias)
......@@ -1417,7 +1475,7 @@ koichik, Maciej Małecki, Guglielmo Ferri, isaacs)
* Bugfix: destroy() instead of end() http connection at end of
pipeline
* Bugfix: http.Client may be prematurely released back to the
* Bugfix: http.Client may be prematurely released back to the
free pool. (Thomas Lee)
* Upgrade V8 to 2.2.8
......
......@@ -78,3 +78,9 @@ The externally maintained libraries used by Node are:
- deps/zlib copyright 1995-2010 Jean-loup Gailly and Mark Adler
licensed under a permissive free software license. See
deps/zlib/LICENSE.
- deps/npm NPM is a package manager program copyright 2009, 2010, 2011
Isaac Z. Schlueter and licensed under MIT. NPM includes several
subpackages MIT or Apache licenses, see deps/npm/LICENSE for more
information. NPM is included in the Node .msi and .pkg distributions
but not in the Node binary itself.
......@@ -89,10 +89,7 @@ website_files = \
out/doc/favicon.ico \
out/doc/pipe.css
doc: doc
out/doc: out/Release/node $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs)
doc docs: out/Release/node $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs)
$(apidoc_dirs):
mkdir -p $@
......@@ -132,14 +129,25 @@ check:
VERSION=v$(shell python tools/getnodeversion.py)
TARNAME=node-$(VERSION)
TARBALL=$(TARNAME).tar.gz
PKG=dist-osx/$(TARNAME).pkg
PKG=out/$(TARNAME).pkg
packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
#dist: doc/node.1 doc/api
dist: $(TARBALL) $(PKG)
PKGDIR=out/dist-osx
pkg: $(PKG)
$(PKG):
-rm -rf dist-osx
tools/osx-dist.sh
-rm -rf $(PKGDIR)
$(WAF) configure --prefix=/usr/local
DESTDIR=$(PKGDIR) $(WAF) install
$(packagemaker) \
--id "org.nodejs.NodeJS-$(VERSION)" \
--doc tools/osx-pkg.pmdoc \
--out $(PKG)
$(TARBALL): out/doc
git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf -
......
......@@ -3,6 +3,3 @@ tags
test
test_g
test_fast
http_parser.Makefile
http_parser.target.mk
test.target.mk
include_directories (.)
add_library (http_parser http_parser.c)
\ No newline at end of file
......@@ -370,6 +370,13 @@ size_t http_parser_execute (http_parser *parser,
uint64_t index = parser->index;
uint64_t nread = parser->nread;
/* technically we could combine all of these (except for url_mark) into one
variable, saving stack space, but it seems more clear to have them
separated. */
const char *header_field_mark = 0;
const char *header_value_mark = 0;
const char *url_mark = 0;
/* We're in an error state. Don't bother doing anything. */
if (HTTP_PARSER_ERRNO(parser) != HPE_OK) {
return 0;
......@@ -396,12 +403,6 @@ size_t http_parser_execute (http_parser *parser,
}
}
/* technically we could combine all of these (except for url_mark) into one
variable, saving stack space, but it seems more clear to have them
separated. */
const char *header_field_mark = 0;
const char *header_value_mark = 0;
const char *url_mark = 0;
if (state == s_header_field)
header_field_mark = data;
......@@ -514,7 +515,7 @@ size_t http_parser_execute (http_parser *parser,
break;
case s_res_first_http_major:
if (ch < '1' || ch > '9') {
if (ch < '0' || ch > '9') {
SET_ERRNO(HPE_INVALID_VERSION);
goto error;
}
......@@ -690,12 +691,13 @@ size_t http_parser_execute (http_parser *parser,
case s_req_method:
{
const char *matcher;
if (ch == '\0') {
SET_ERRNO(HPE_INVALID_METHOD);
goto error;
}
const char *matcher = method_strings[parser->method];
matcher = method_strings[parser->method];
if (ch == ' ' && matcher[index] == '\0') {
state = s_req_spaces_before_url;
} else if (ch == matcher[index]) {
......
......@@ -5,24 +5,69 @@
# ./gyp/gyp -f make --depth=`pwd` http_parser.gyp
# ./out/Debug/test
{
'target_defaults': {
'default_configuration': 'Debug',
'configurations': {
# TODO: hoist these out and put them somewhere common, because
# RuntimeLibrary MUST MATCH across the entire project
'Debug': {
'defines': [ 'DEBUG', '_DEBUG' ],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 1, # static debug
},
},
},
'Release': {
'defines': [ 'NDEBUG' ],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 0, # static release
},
},
}
},
'msvs_settings': {
'VCCLCompilerTool': {
},
'VCLibrarianTool': {
},
'VCLinkerTool': {
'GenerateDebugInformation': 'true',
},
},
'conditions': [
['OS == "win"', {
'defines': [
'WIN32'
],
}]
],
},
'targets': [
{
'target_name': 'http_parser',
'type': '<(library)',
'type': 'static_library',
'include_dirs': [ '.' ],
'direct_dependent_settings': {
'include_dirs': [ '.' ],
},
'defines': [ 'HTTP_PARSER_STRICT=0' ],
'sources': [ './http_parser.c', ],
'msvs_settings': {
'VCCLCompilerTool': {
# Compile as C++. http_parser.c is actually C99, but C++ is
# close enough in this case.
'CompileAs': 2, # compile as C++
},
},
'conditions': [
['OS=="win"', {
'msvs_settings': {
'VCCLCompilerTool': {
# Compile as C++. http_parser.c is actually C99, but C++ is
# close enough in this case.
'CompileAs': 2,
},
},
}]
],
},
{
'target_name': 'test',
'type': 'executable',
......
......@@ -222,7 +222,7 @@ struct http_parser {
* Should be checked when http_parser_execute() returns in addition to
* error checking.
*/
char upgrade : 1;
unsigned char upgrade : 1;
#if HTTP_PARSER_DEBUG
uint32_t error_lineno;
......
......@@ -1041,8 +1041,24 @@ const struct message responses[] =
,.body= ""
}
#define HTTP_VERSION_0_9 12
/* Should handle HTTP/0.9 */
, {.name= "http version 0.9"
,.type= HTTP_RESPONSE
,.raw= "HTTP/0.9 200 OK\r\n"
"\r\n"
,.should_keep_alive= FALSE
,.message_complete_on_eof= TRUE
,.http_major= 0
,.http_minor= 9
,.status_code= 200
,.num_headers= 0
,.headers=
{}
,.body= ""
}
, {.name= NULL } /* sentinel */
};
int
......
[submodule "node_modules/semver"]
path = node_modules/semver
url = https://github.com/isaacs/node-semver.git
[submodule "node_modules/abbrev"]
path = node_modules/abbrev
url = https://github.com/isaacs/abbrev-js.git
[submodule "node_modules/nopt"]
path = node_modules/nopt
url = https://github.com/isaacs/nopt.git
[submodule "node_modules/node-uuid"]
path = node_modules/node-uuid
url = https://github.com/broofa/node-uuid
[submodule "node_modules/minimatch"]
path = node_modules/minimatch
url = https://github.com/isaacs/minimatch.git
[submodule "node_modules/graceful-fs"]
path = node_modules/graceful-fs
url = https://github.com/isaacs/node-graceful-fs.git
[submodule "node_modules/slide"]
path = node_modules/slide
url = https://github.com/isaacs/slide-flow-control.git
[submodule "node_modules/rimraf"]
path = node_modules/rimraf
url = https://github.com/isaacs/rimraf.git
[submodule "node_modules/proto-list"]
path = node_modules/proto-list
url = https://github.com/isaacs/proto-list.git
[submodule "node_modules/ini"]
path = node_modules/ini
url = https://github.com/isaacs/ini.git
[submodule "node_modules/which"]
path = node_modules/which
url = https://github.com/isaacs/node-which.git
[submodule "node_modules/request"]
path = node_modules/request
url = https://github.com/mikeal/request.git
[submodule "node_modules/tar"]
path = node_modules/tar
url = git://github.com/isaacs/node-tar.git