Several changes, enabling testing of OAuth Consumer flows #47

Merged
merged 17 commits into from Jul 1, 2011

Conversation

Projects
None yet
4 participants
Contributor

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.
a202f51
@bnoguchi bnoguchi Replaced legacy http.createClient with node's newer http.request (tha…
…t uses Agent instead of Client).
fc0c872
@bnoguchi bnoguchi Removed headers.Host assignment because node's new http.request(...) …
…using Agent automatically does this for us.
713b467
@bnoguchi bnoguchi Added failing test showing that requesting full uri's does not work (…
…when uri hostname is 127.0.0.1, localhost)
e3e43a2
@bnoguchi bnoguchi Requesting full uri's (on 127.0.0.1) now works (in addition to prior …
…support for requesting just paths)
ceff70d
@bnoguchi bnoguchi Added failing test demonstrating inability to request a full uri at a…
… different hostname.
973773e
@bnoguchi bnoguchi Added ability to request a full uri that exists at a different hostna…
…me than the host associated with a Browser instance.
3446340
@bnoguchi bnoguchi Added failing test demonstrating that re-direction from one host to a…
…nother host does not work.
6bebe50
@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…
…oject).
4fd16e3

@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
6fb8c86

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

Member

tj commented on a202f51 Jul 1, 2011

this is not valid

Member

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

Contributor

bnoguchi replied Jul 1, 2011

Had to do it because http://www.facebook.com/ home page login form is using POST, not post.

Member

tj commented on fc0c872 Jul 1, 2011

whoop, thanks

missing typeof?

Member

tj replied Jul 1, 2011

looks like it

Contributor

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