Set request type before setting body #599

Merged
merged 2 commits into from Aug 2, 2012

2 participants

@omeryar

having the body set before the type meant the body was encoded as html
no matter what the type actually is.

@nateabele
Union of RAD member

Why is every line in the class rewritten in the diff?

@omeryar

because I screwed up.
reverted old commit and added a fixed one.
Let me know if you prefer a new pull request.

@nateabele
Union of RAD member

Nope, the existing PR is fine. Just do us a favor and squash your commits so we can keep the history clean. :-)

The patch itself looks good. We'll get it merged in once one of us has a chance to add a failing test against the Service class (you're welcome to add one instead if you're so inclined). Thanks again for tracking this down!

@omeryar

squashed.

@omeryar omeryar updated testJsonPost to test 56a5ef4
new test would have failed before
59c1780
@omeryar

updated testJsonPost().
new test would have failed before 56a5ef4 with:

Exception thrown in -::join() on line 105
Array to string conversion

in lithium\net\http\Request::_encode()

@nateabele nateabele merged commit 9cb627c into UnionOfRAD:dev Aug 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment