projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8444c99
)
tests/soup.js
author
Alan Knowles
<alan@akbkhome.com>
Thu, 24 May 2012 22:22:07 +0000
(06:22 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Thu, 24 May 2012 22:22:07 +0000
(06:22 +0800)
tests/soup.js
patch
|
blob
|
history
diff --git
a/tests/soup.js
b/tests/soup.js
index
fbc5632
..
4fcaf4b
100644
(file)
--- a/
tests/soup.js
+++ b/
tests/soup.js
@@
-8,7
+8,6
@@
GLib = imports.gi.GLib;
var session = new Soup.SessionSync();
File = imports['../File.js'].File;
var session = new Soup.SessionSync();
File = imports['../File.js'].File;
-Netrc.load();
// Soup.URI is a struct.
var uri = new Soup.URI.c_new("http://www.roojs.com/admin.php/Roo/Events");
// Soup.URI is a struct.
var uri = new Soup.URI.c_new("http://www.roojs.com/admin.php/Roo/Events");
@@
-24,12
+23,12
@@
msg.set_request('application/x-www-form-urlencoded', Soup.MemoryUse.COPY, buftxt
var auth = new Soup.Auth.c_new(Soup.AuthBasic.type, msg, "Basic realm=\"Test\"");
var auth = new Soup.Auth.c_new(Soup.AuthBasic.type, msg, "Basic realm=\"Test\"");
-print(auth);
-
print(auth.authenticate
);
-var authvals = authdata['git.roojs.com'];
+
+
var authvals = Netrc.forHost('git.roojs.com'
);
+
auth.authenticate(authvals.login ,authvals.password);
var authmsg = auth.get_authorization(msg);
auth.authenticate(authvals.login ,authvals.password);
var authmsg = auth.get_authorization(msg);
-print(authmsg);
+
//
print(authmsg);
msg.request_headers.append('Authorization', authmsg)
//request.headers_append...
msg.request_headers.append('Authorization', authmsg)
//request.headers_append...