Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/v0.10'
Browse files Browse the repository at this point in the history
Conflicts:
	src/stream_wrap.cc
  • Loading branch information
tjfontaine committed Dec 2, 2013
2 parents 5ce4eed + 6877e64 commit 001f9b4
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
4 changes: 3 additions & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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' ]
}, {
Expand All @@ -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': {
Expand Down
19 changes: 17 additions & 2 deletions doc/api/http.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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()`
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/api/net.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
6 changes: 6 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down
2 changes: 1 addition & 1 deletion src/stream_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 001f9b4

Please sign in to comment.