Default content-type to 'application/octect-stream'#128
Default content-type to 'application/octect-stream'#128alexindigo merged 1 commit intoform-data:masterfrom DylanPiercey:master
Conversation
There was a problem hiding this comment.
Do you mind to make it a "constant", similar to FormData.LINE_BREAK?
There was a problem hiding this comment.
FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';Good enough?
There was a problem hiding this comment.
This has been fixed :).
|
Great stuff! Thank you very much. Few minor comments, but in general is super awesome. Thank you very much for do it. |
|
I have made most of the changes you recommended. Let me know if anymore work is needed to get this merged. 👍 |
|
Thank you. Looks much better than it was before. :) I'd like to try another iteration on conditional content-type asserts. |
|
@felixge What do you think on another Santa's helper? :) |
|
Hows that? |
There was a problem hiding this comment.
Great! More verbose where it needs to be and more concise where details not important.
I think we don't need type for this one, it's not a file, so we don't send Content-Type along and we don't check for it. Am I right?
Other than that it's 👍
There was a problem hiding this comment.
Good point, checking it out now.
There was a problem hiding this comment.
Fixed now, missed that this was a field not a file.
Edit: Apparently the build is failing now, trying to fix.
There was a problem hiding this comment.
Build failed initially but now is passing. I cannot replicate this on my local machine, perhaps it would be formidable calling it's event emitters out of sync but I'm not entirely sure.
Whats your thoughts @alexindigo?
|
Perfect. Thanks. Checking failed builds. |
There was a problem hiding this comment.
Yep. Build was right. Parsing could take longer for some things.
AssertionError: 'remote_file' === 'my_file'
at IncomingForm.<anonymous> (/home/travis/build/felixge/node-form-data/test/integration/test-submit-custom-header.js:53:14)
at emitTwo (events.js:87:13)
at IncomingForm.emit (events.js:172:7)
at /home/travis/build/felixge/node-form-data/node_modules/formidable/lib/incoming_form.js:229:12
at WriteStream.<anonymous> (/home/travis/build/felixge/node-form-data/node_modules/formidable/lib/file.js:70:5)
at WriteStream.g (events.js:260:16)
at emitNone (events.js:72:20)
at WriteStream.emit (events.js:166:7)
at finishMaybe (_stream_writable.js:468:14)
at afterWrite (_stream_writable.js:347:3)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
iojs /home/travis/build/felixge/node-form-data/test/integration/test-submit-custom-header.js
Let's make it hash instead of array, with name as the key, to avoid failing for nothing builds.
There was a problem hiding this comment.
I'll try to get to this tonight. If not tomorrow.
There was a problem hiding this comment.
Thank you very much for all the work.
There was a problem hiding this comment.
No problem, using this lib in a few sites, glad to see strictish PRs.
Also, found some time, it's fixed now. 👍
There was a problem hiding this comment.
Thank you.
And strictishness is not the goal. :) Tests saved our necks quite a few times, so we're trying to be careful about them. Especially in the light of this library being used not only with end-user apps, but as part of other libraries. Biggest customer for us is request module, it won't be fun to break things for so many people.
There was a problem hiding this comment.
Very much agree. Was not aware of request using this.
Thanks for merging.
Unrelated - Is there a better medium to contact you for future PR's without cluttering the comments? I also have some questions.
There was a problem hiding this comment.
I'm one of the maintainers, so issues here would be better way to discuss library specific questions. Although for faster turnaround, you can find me on gtalk ([email protected]).
Actually I'm thinking maybe it's time to create some kind of general chat room. Like I noticed Electron has it's own Slack org.
There was a problem hiding this comment.
https://gitter.im works really well also - and is simple to setup.
Slack is also great though.
There was a problem hiding this comment.
Let's try Gitter (https://gitter.im/felixge/node-form-data). :)
PS. I'm just big sucker for desktop apps :)
There was a problem hiding this comment.
Default content-type to 'application/octect-stream'
Resolves #118.
Also fixes #54.