Skip to content

Commit

Permalink
fix deprecated Buffer.write call for node 0.11.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Dahan committed Nov 10, 2014
1 parent ac89c44 commit f4a3e08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/multipart_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ MultipartParser.stateToString = function(stateNumber) {

MultipartParser.prototype.initWithBoundary = function(str) {
this.boundary = new Buffer(str.length+4);
this.boundary.write('\r\n--', 'ascii', 0);
this.boundary.write(str, 'ascii', 4);
this.boundary.write('\r\n--', 0, 'ascii');
this.boundary.write(str, 4, 'ascii');
this.lookbehind = new Buffer(this.boundary.length+8);
this.state = S.START;

Expand Down

1 comment on commit f4a3e08

@harellevy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! worked for me

Please sign in to comment.