Skip to content

Conversation

@mloar
Copy link
Contributor

@mloar mloar commented Jun 2, 2013

Restler supplies a Data object, but it is improperly handled when writing to the stream.

  1. Omission of an 'else' results in the metadata associated with the object not being written in the part header.
  2. Omission of handling when writing the value results in "[Object object]" being written to the stream.

This corrects these two issues.

@lapo-luchini
Copy link
Contributor

I hope this gets in an npm release soon, as depending on a github fork (as opposed to a package) is more difficult to npm install on some production servers that can only access http.

@easternbloc
Copy link
Collaborator

@lapo-luchini can you write a test for this? I'm happy to merge it once it has coverage...

@lapo-luchini
Copy link
Contributor

OK, I will try and do that.

@lapo-luchini
Copy link
Contributor

I added a test case for this in lapo-luchini/restler@5b2d4cc3b500d7c305dfcce5bdf615154a67dcee, but I can't produce a clean pull request from that branch as I imported both changes from #119 and #108.
Can you pluck the test, or should I create a brand new branch to pull from?

@easternbloc
Copy link
Collaborator

If you can make a fresh PR that would be greatly appreciated. :)

@lapo-luchini
Copy link
Contributor

OK, everything's in the new PR #172; I hope the testcase is ok, it's the first I write with nodeunit, but duplicating an existing example was easy enough.
(also: notice that there are no tests for multi-part using File content, so this test for Data is adding actual coverage also to the common parts)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants