Skip to content

Commit

Permalink
change body.length to Buffer.byteLength(body)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanong committed Dec 21, 2013
1 parent fc74547 commit 878d2c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion en/guide/intro.jade
Expand Up @@ -83,7 +83,7 @@ section
app.get('/hello.txt', function(req, res){
var body = 'Hello World';
res.setHeader('Content-Type', 'text/plain');
res.setHeader('Content-Length', body.length);
res.setHeader('Content-Length', Buffer.byteLength(body));
res.end(body);
});

Expand Down
2 changes: 1 addition & 1 deletion guide.html
Expand Up @@ -57,7 +57,7 @@
</p><pre class="js"><code>app.get('/hello.txt', function(req, res){
var body = 'Hello World';
res.setHeader('Content-Type', 'text/plain');
res.setHeader('Content-Length', body.length);
res.setHeader('Content-Length', Buffer.byteLength(body));
res.end(body);
});
</code></pre><p>Express augments these objects providing you with higher level
Expand Down

0 comments on commit 878d2c5

Please sign in to comment.