You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ripple.apache.org by gt...@apache.org on 2013/03/11 16:11:04 UTC

[43/50] [abbrv] git commit: Don't re-use cookies across XHR proxy requests.

Don't re-use cookies across XHR proxy requests.

When proxing an XMLHttpRequest call via the XHR proxy, the `jar` option
in the `request` package was turned on by default. This would remember
cookies for future requests, which is bad because each request should be
separate, and the domain for cookies is the proxy's address, which is
invalid, anyways.

As a result, there ended up being a large accruing of
random cookies that had buggy effects, such as hitting
cookie header size limits on various web servers.

This fixed GitHub Issue:

    http://github.com/blackberry/Ripple-UI/issues/732

Side Note:

It seems cookie support, in general, is not feasible with the proxy
enabled, because the remote domain is always the proxy's address, and
not the actual remote domain being requested. This is something to
figure out separately.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ripple/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ripple/commit/632a3845
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ripple/tree/632a3845
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ripple/diff/632a3845

Branch: refs/heads/master
Commit: 632a38457d644f2ba72d628b7ba0288d1f03d7c4
Parents: 66be754
Author: Brent Lintner <br...@gmail.com>
Authored: Wed Feb 27 16:51:03 2013 -0500
Committer: Brent Lintner <br...@gmail.com>
Committed: Thu Feb 28 13:44:15 2013 -0500

----------------------------------------------------------------------
 lib/server/proxy.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ripple/blob/632a3845/lib/server/proxy.js
----------------------------------------------------------------------
diff --git a/lib/server/proxy.js b/lib/server/proxy.js
index 8ca69cc..41771ed 100644
--- a/lib/server/proxy.js
+++ b/lib/server/proxy.js
@@ -73,7 +73,8 @@ function proxy(req, res, callback) {
         proxyReqData = {
             url: parsedURL,
             method: req.method,
-            headers: proxyReqHeaders
+            headers: proxyReqHeaders,
+            jar: false
         };
 
         if (Object.keys(req.body).length > 0) {