Browse Source

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

Conflicts:
	src/stream_wrap.cc
v0.11.10-release
Timothy J Fontaine 11 years ago
parent
commit
001f9b46e7
  1. 4
      common.gypi
  2. 19
      doc/api/http.markdown
  3. 2
      doc/api/net.markdown
  4. 6
      node.gyp
  5. 2
      src/stream_wrap.cc

4
common.gypi

@ -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': {

19
doc/api/http.markdown

@ -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

2
doc/api/net.markdown

@ -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])

6
node.gyp

@ -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': {

2
src/stream_wrap.cc

@ -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();

Loading…
Cancel
Save