Merge remote-tracking branch 'upstream/v0.10'

Conflicts:
	src/stream_wrap.cc
archived-io.js-v0.10
Timothy J Fontaine 2013-12-01 19:43:34 -08:00
commit 001f9b46e7
5 changed files with 28 additions and 5 deletions

View File

@ -55,7 +55,6 @@
'msvs_configuration_platform': 'x64',
}],
['OS=="solaris"', {
'cflags': [ '-fno-omit-frame-pointer' ],
# pull in V8's postmortem metadata
'ldflags': [ '-Wl,-z,allextract' ]
}, {
@ -68,6 +67,9 @@
['clang == 0 and gcc_version <= 44', {
'cflags': [ '-fno-tree-sink' ], # Work around compiler bug.
}],
['OS!="mac" and OS!="win"', {
'cflags': [ '-fno-omit-frame-pointer' ],
}],
],
'msvs_settings': {
'VCCLCompilerTool': {

View File

@ -259,6 +259,17 @@ The response implements the [Writable Stream][] interface. This is an
Indicates that the underlying connection was terminated before
[response.end()][] was called or able to flush.
### Event: 'finish'
`function () { }`
Emitted when the response has been sent. More specifically, this event is
emitted when the last segment of the response headers and body have been
handed off to the operating system for transmission over the network. It
does not imply that the client has received anything yet.
After this event, no more events will be emitted on the response object.
### response.writeContinue()
Sends a HTTP/1.1 100 Continue message to the client, indicating that
@ -433,7 +444,7 @@ If `data` is specified, it is equivalent to calling `response.write(data, encodi
followed by `response.end()`.
## http.request(options, callback)
## http.request(options, [callback])
Node maintains several connections per server to make HTTP requests.
This function allows one to transparently issue requests.
@ -469,6 +480,9 @@ Options:
send TCP KeepAlive packets over sockets being kept alive. Default =
`1000`. Only relevant if `keepAlive` is set to `true`.
The optional `callback` parameter will be added as a one time listener for
the ['response'][] event.
`http.request()` returns an instance of the [http.ClientRequest][]
class. The `ClientRequest` instance is a writable stream. If one needs to
upload a file with a POST request, then write to the `ClientRequest` object.
@ -523,7 +537,7 @@ There are a few special headers that should be noted.
* Sending an Authorization header will override using the `auth` option
to compute basic authentication.
## http.get(options, callback)
## http.get(options, [callback])
Since most requests are GET requests without bodies, Node provides this
convenience method. The only difference between this method and `http.request()`
@ -1008,6 +1022,7 @@ authentication details.
['checkContinue']: #http_event_checkcontinue
['listening']: net.html#net_event_listening
['response']: #http_event_response
[Agent]: #http_class_http_agent
[Buffer]: buffer.html#buffer_buffer
[EventEmitter]: events.html#events_class_events_eventemitter

View File

@ -98,7 +98,7 @@ Here is an example of a client of echo server as described previously:
To connect on the socket `/tmp/echo.sock` the second line would just be
changed to
var client = net.connect({path: '/tmp/echo.sock'},
var client = net.connect({path: '/tmp/echo.sock'});
## net.connect(port, [host], [connectListener])
## net.createConnection(port, [host], [connectListener])

View File

@ -319,6 +319,12 @@
'PLATFORM="sunos"',
],
}],
[
'OS=="linux"', {
'ldflags': [
'-Wl,--whole-archive <(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.<(target_arch).a -Wl,--no-whole-archive',
],
}],
],
'msvs_settings': {
'VCLinkerTool': {

View File

@ -299,7 +299,7 @@ void StreamWrap::WriteStringImpl(const FunctionCallbackInfo<Value>& args) {
req_wrap->Dispatched();
req_wrap->object()->Set(env->bytes_string(),
Number::New(node_isolate, data_size));
Integer::NewFromUnsigned(data_size, node_isolate));
if (err) {
req_wrap->~WriteWrap();