@@ -20,14 +20,16 @@ util.inherits(FormData, CombinedStream);
2020
2121FormData . LINE_BREAK = '\r\n' ;
2222
23- FormData . prototype . append = function ( field , value ) {
23+ FormData . prototype . append = function ( field , value , options ) {
24+ options = options || { } ;
25+
2426 var append = CombinedStream . prototype . append . bind ( this ) ;
2527
2628 // all that streamy business can't handle numbers
2729 if ( typeof value == 'number' ) value = '' + value ;
2830
29- var header = this . _multiPartHeader ( field , value ) ;
30- var footer = this . _multiPartFooter ( field , value ) ;
31+ var header = this . _multiPartHeader ( field , value , options ) ;
32+ var footer = this . _multiPartFooter ( field , value , options ) ;
3133
3234 append ( header ) ;
3335 append ( value ) ;
@@ -87,7 +89,7 @@ FormData.prototype._trackLength = function(header, value) {
8789 } ) ;
8890} ;
8991
90- FormData . prototype . _multiPartHeader = function ( field , value ) {
92+ FormData . prototype . _multiPartHeader = function ( field , value , options ) {
9193 var boundary = this . getBoundary ( ) ;
9294 var header =
9395 '--' + boundary + FormData . LINE_BREAK +
@@ -111,7 +113,7 @@ FormData.prototype._multiPartHeader = function(field, value) {
111113 return header ;
112114} ;
113115
114- FormData . prototype . _multiPartFooter = function ( field , value ) {
116+ FormData . prototype . _multiPartFooter = function ( field , value , options ) {
115117 return function ( next ) {
116118 var footer = FormData . LINE_BREAK ;
117119
0 commit comments