X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=doc%2Fapi%2Fhttp.markdown;h=ad102eb204f5b840579dd90774f0e9735ee44bd7;hb=6d5218bc7d344b0f4e0a0cb50fdd25052946cc4f;hp=497adba5528812892fc803ec717f40ed7186b9a5;hpb=a6e0a91a70ed450166a2066fe2a7d6a0d3969ca9;p=platform%2Fupstream%2Fnodejs.git diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 497adba..ad102eb 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -42,7 +42,7 @@ per connection (in the case of keep-alive connections). When a new TCP stream is established. `socket` is an object of type `net.Socket`. Usually users will not want to access this event. The - `stream` can also be accessed at `request.connection`. + `socket` can also be accessed at `request.connection`. ### Event: 'close' @@ -283,6 +283,8 @@ Note: that Content-Length is given in bytes not characters. The above example works because the string `'hello world'` contains only single byte characters. If the body contains higher coded characters then `Buffer.byteLength()` should be used to determine the number of bytes in a given encoding. +And Node does not check whether Content-Length and the length of the body +which has been transmitted are equal or not. ### response.statusCode @@ -294,6 +296,9 @@ Example: response.statusCode = 404; +After response header was sent to the client, this property indicates the +status code which was sent out. + ### response.setHeader(name, value) Sets a single header value for implicit headers. If this header already exists @@ -528,6 +533,8 @@ event, the entire body will be caught. }); This is a `Writable Stream`. +Note: Node does not check whether Content-Length and the length of the body +which has been transmitted are equal or not. This is an `EventEmitter` with the following events: