Changeset 192
- Timestamp:
- 04/23/07 14:14:29 (6 years ago)
- Files:
-
- 1 modified
-
jala/trunk/util/Test/code/Global/jala.Test.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jala/trunk/util/Test/code/Global/jala.Test.js
r162 r192 932 932 jala.Test.HttpClient = function() { 933 933 var client = new helma.Http(); 934 var cookie = null;934 var cookies = null; 935 935 936 936 /** … … 945 945 /** 946 946 * Sets the cookie to use for subsequent requests using this client 947 * @param { Object} cThe cookie object as received from helma.Http.getUrl947 * @param {Array} arr The cookie object as received from helma.Http.getUrl 948 948 */ 949 this.setCookie = function(c) {950 cookie = c;949 this.setCookies = function(arr) { 950 cookies = arr; 951 951 return; 952 952 }; 953 953 954 954 /** 955 * Returns the cookie set for this http client 955 * Returns the cookies set for this http client 956 * @returns The cookies to use for subsequent requests 957 * @type Array 956 958 */ 957 this.getCookie = function() {958 return cookie ;959 this.getCookies = function() { 960 return cookies; 959 961 }; 960 962 … … 973 975 var client = this.getClient(); 974 976 client.setMethod(method); 975 var cookie = this.getCookie(); 976 if (cookie != null) { 977 client.setCookie(cookie.name, cookie.value); 978 } 977 client.setCookies(this.getCookies()); 979 978 // prevent any caching at the remote server or any intermediate proxy 980 979 client.setHeader("Cache-control", "no-cache,max-age=0"); … … 984 983 client.setFollowRedirects(false); 985 984 var result = client.getUrl(url); 986 if (result.cookie != null) {987 this.setCookie (result.cookie);985 if (result.cookies != null) { 986 this.setCookies(result.cookies); 988 987 } 989 988 if (result.location != null) {
![(please configure the [header_logo] section in trac.ini)](/jala/chrome/common/trac_banner.png)