Example #1
0
		internal HttpWebResponse(mainsoft.apache.commons.httpclient.HttpMethod httpMethod,
			mainsoft.apache.commons.httpclient.HttpState state,
			HttpStateCache stateCache,
			Uri uri, string method)
		{
			_httpMethod = httpMethod;
			_uri = uri;
			_method = method;
			_state = state;
			_stateCache = stateCache;
		}
Example #2
0
		private mainsoft.apache.commons.httpclient.Cookie [] FetchResponseCookies (mainsoft.apache.commons.httpclient.Header [] headers,
																				mainsoft.apache.commons.httpclient.Cookie [] stateCookies) {
			System.Collections.ArrayList list = new System.Collections.ArrayList();
			foreach (mainsoft.apache.commons.httpclient.Header h in headers) {
				foreach (mainsoft.apache.commons.httpclient.HeaderElement element in h.getValues ()) {
					mainsoft.apache.commons.httpclient.Cookie c = FindCookie (stateCookies, element.getName ());
					if (c != null)
						list.Add(c);
				}
			}

			return (mainsoft.apache.commons.httpclient.Cookie[]) list.ToArray(typeof(mainsoft.apache.commons.httpclient.Cookie));
		}
Example #3
0
		private mainsoft.apache.commons.httpclient.Cookie FindCookie (mainsoft.apache.commons.httpclient.Cookie [] cookies, string name) {
			for (int i = 0; i < cookies.Length; ++i)
				if (cookies [i].getName () == name)
					return cookies [i];
			return null;
		}