Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

FormData.append(x, []) freaks out #435

Closed
bmeck opened this Issue Feb 18, 2013 · 2 comments

Comments

Projects
None yet
2 participants

bmeck commented Feb 18, 2013

nt

bradleymeck module-forge>node
> r=require('request')({method:'POST',url:'http://***.iriscouch.com/grunt-example'})
{ domain: null,
  _events: { pipe: { [Function: g] listener: [Function] } },
  _maxListeners: 10,
  readable: true,
  writable: true,
  method: 'POST',
  pool: {},
  dests: [],
  __isRequestRequest: true,
  uri: 
   { protocol: 'http:',
     slashes: true,
     host: '***.iriscouch.com',
     hostname: '***.iriscouch.com',
     href: 'http://***.iriscouch.com/grunt-example',
     pathname: '/grunt-example',
     path: '/grunt-example',
     port: 80 },
  _redirectsFollowed: 0,
  maxRedirects: 10,
  followRedirect: true,
  followAllRedirects: false,
  redirects: [],
  headers: { host: '***.iriscouch.com' },
  setHost: true,
  originalCookieHeader: undefined,
  _jar: undefined,
  port: 80,
  host: '***.iriscouch.com',
  clientErrorHandler: [Function],
  _parserErrorHandler: [Function],
  path: '/grunt-example',
  httpModule: 
   { parsers: 
      { name: 'parsers',
        constructor: [Function],
        max: 1000,
        list: [] },
     STATUS_CODES: 
      { '100': 'Continue',
        '101': 'Switching Protocols',
        '102': 'Processing',
        '200': 'OK',
        '201': 'Created',
        '202': 'Accepted',
        '203': 'Non-Authoritative Information',
        '204': 'No Content',
        '205': 'Reset Content',
        '206': 'Partial Content',
        '207': 'Multi-Status',
        '300': 'Multiple Choices',
        '301': 'Moved Permanently',
        '302': 'Moved Temporarily',
        '303': 'See Other',
        '304': 'Not Modified',
        '305': 'Use Proxy',
        '307': 'Temporary Redirect',
        '400': 'Bad Request',
        '401': 'Unauthorized',
        '402': 'Payment Required',
        '403': 'Forbidden',
        '404': 'Not Found',
        '405': 'Method Not Allowed',
        '406': 'Not Acceptable',
        '407': 'Proxy Authentication Required',
        '408': 'Request Time-out',
        '409': 'Conflict',
        '410': 'Gone',
        '411': 'Length Required',
        '412': 'Precondition Failed',
        '413': 'Request Entity Too Large',
        '414': 'Request-URI Too Large',
        '415': 'Unsupported Media Type',
        '416': 'Requested Range Not Satisfiable',
        '417': 'Expectation Failed',
        '418': 'I\'m a teapot',
        '422': 'Unprocessable Entity',
        '423': 'Locked',
        '424': 'Failed Dependency',
        '425': 'Unordered Collection',
        '426': 'Upgrade Required',
        '428': 'Precondition Required',
        '429': 'Too Many Requests',
        '431': 'Request Header Fields Too Large',
        '500': 'Internal Server Error',
        '501': 'Not Implemented',
        '502': 'Bad Gateway',
        '503': 'Service Unavailable',
        '504': 'Gateway Time-out',
        '505': 'HTTP Version not supported',
        '506': 'Variant Also Negotiates',
        '507': 'Insufficient Storage',
        '509': 'Bandwidth Limit Exceeded',
        '510': 'Not Extended',
        '511': 'Network Authentication Required' },
     IncomingMessage: { [Function: IncomingMessage] super_: [Object] },
     OutgoingMessage: { [Function: OutgoingMessage] super_: [Object] },
     ServerResponse: { [Function: ServerResponse] super_: [Object] },
     Agent: 
      { [Function: Agent]
        super_: [Function: EventEmitter],
        defaultMaxSockets: 5 },
     globalAgent: 
      { domain: null,
        _events: [Object],
        _maxListeners: 10,
        options: {},
        requests: {},
        sockets: {},
        maxSockets: 5,
        createConnection: [Function] },
     ClientRequest: { [Function: ClientRequest] super_: [Object] },
     request: [Function],
     get: [Function],
     Server: { [Function: Server] super_: [Object] },
     createServer: [Function],
     _connectionListener: [Function: connectionListener],
     Client: [Function: deprecated],
     createClient: [Function: deprecated] },
  agentClass: 
   { [Function: Agent]
     super_: [Function: EventEmitter],
     defaultMaxSockets: 5 },
  agent: 
   { domain: null,
     _events: { free: [Function] },
     _maxListeners: 10,
     options: {},
     requests: {},
     sockets: {},
     maxSockets: 5,
     createConnection: [Function] } }
> f = r.form();
{ _overheadLength: 0,
  _valueLength: 0,
  _lengthRetrievers: [],
  writable: false,
  readable: true,
  dataSize: 0,
  maxDataSize: 2097152,
  pauseStreams: true,
  _released: false,
  _streams: [],
  _currentStream: null }
> f.append('argv', [])
TypeError: Object  has no method 'on'
    at FormData.CombinedStream.append (/Users/bradleymeck/Documents/clean/module-forge/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js:41:14)
    at FormData.append (/Users/bradleymeck/Documents/clean/module-forge/node_modules/request/node_modules/form-data/lib/form_data.js:33:3)
    at repl:1:4
    at REPLServer.self.eval (repl.js:109:21)
    at Interface.<anonymous> (repl.js:248:12)
    at Interface.EventEmitter.emit (events.js:96:17)
    at Interface._onLine (readline.js:200:10)
    at Interface._line (readline.js:518:8)
    at Interface._ttyWrite (readline.js:736:14)
    at ReadStream.onkeypress (readline.js:97:10)
> 
Owner

mikeal commented Feb 18, 2013

this looks like a bug in @felixge's formdata library.

@bmeck bmeck referenced this issue in form-data/form-data Feb 18, 2013

Closed

FormData.append(x, []) freaks out #26

@bmeck bmeck closed this Feb 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment