Several changes, enabling testing of OAuth Consumer flows #47

merged 17 commits into from Jul 1, 2011


None yet
4 participants

bnoguchi commented Jul 1, 2011

I patched tobi to test everyauth's Facebook Connect support.

Changes include:

  • Submitting <form> with method="POST" (as opposed to only method="post" before)
  • Use of node's new http Agent' over the legacy Client
  • https detection and support
  • Make it appear as if one browser can interact with more than 1 hostname (e.g., 1 hostname redirecting to another hostname)
  • Ability to specify User-Agent on a Browser instance (for use in all requests by that Browser instance)

... with tests to boot. All tests pass.

bnoguchi added some commits Jul 1, 2011

@bnoguchi bnoguchi Allow forms with method="POST" in caps to be submitted by lowercasing…
… it in order to match the #post method.
@bnoguchi bnoguchi Replaced legacy http.createClient with node's newer http.request (tha…
…t uses Agent instead of Client).
@bnoguchi bnoguchi Removed headers.Host assignment because node's new http.request(...) …
…using Agent automatically does this for us.
@bnoguchi bnoguchi Added failing test showing that requesting full uri's does not work (…
…when uri hostname is, localhost)
@bnoguchi bnoguchi Requesting full uri's (on now works (in addition to prior …
…support for requesting just paths)
@bnoguchi bnoguchi Added failing test demonstrating inability to request a full uri at a…
… different hostname.
@bnoguchi bnoguchi Added ability to request a full uri that exists at a different hostna…
…me than the host associated with a Browser instance.
@bnoguchi bnoguchi Added failing test demonstrating that re-direction from one host to a…
…nother host does not work.
@bnoguchi bnoguchi Got redirection from one host to another host working. b473c8b
@bnoguchi bnoguchi Re-factored multiple browsers for mutliple hosts logic. 8530d7e
@bnoguchi bnoguchi Added test demonstrating that requesting a uri with https does not work. a8b12cb
@bnoguchi bnoguchi Got https requests working. c17e120
@bnoguchi bnoguchi Added test showing redirection from http host to https host works. f6d3b0b
@bnoguchi bnoguchi Added failing test for setting User-Agent. 740448d
@bnoguchi bnoguchi Edited failing test demonstrating userAgent 300f9a2
@bnoguchi bnoguchi Added ability to set User-Agent on the browser via Browser#userAgent 3f1db49
@bnoguchi bnoguchi Final set of changes (needed for Facebook Connect tests in another pr…

@rauchg rauchg added a commit that referenced this pull request Jul 1, 2011

@rauchg rauchg Merge pull request #47 from bnoguchi/multi-host
Several changes, enabling testing of OAuth Consumer flows

@rauchg rauchg merged commit 6fb8c86 into LearnBoost:master Jul 1, 2011


tj commented on a202f51 Jul 1, 2011

this is not valid


tj replied Jul 1, 2011

hmm, trying to find a more recent rfc, I swear it used to be case sensitive, I'll leave it in


bnoguchi replied Jul 1, 2011

Had to do it because home page login form is using POST, not post.


tj commented on fc0c872 Jul 1, 2011

whoop, thanks

missing typeof?


tj replied Jul 1, 2011

looks like it


bnoguchi replied Jul 1, 2011

typeof absence intentional. While I can't recall the exact url's, one url was eval'ing to host/path string 'undefined'; another url was evaling to host/path value undefined.

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