* WebConnection.cs: setup the tunnled connection when using a proxy and
https.
+2004-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HttpWebRequest.cs: ProxyQuery returns true when we use a proxy without
+ tunneling a secure connection.
+
+ * ServicePoint.cs: added UseConnect property.
+
+ * ServicePointManager.cs: set the UseConnect property when we use a http
+ proxy for a https connection.
+
+ * WebConnection.cs: setup the tunnled connection when using a proxy and
+ https.
+
2004-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* HttpWebResponse.cs: remove unused SplitValue method.
get { return webHeaders ["Accept"]; }
set {
CheckRequestStarted ();
- webHeaders.SetInternal ("Accept", value);
+ webHeaders.RemoveAndAdd ("Accept", value);
}
}
if (keepAlive && val.IndexOf ("keep-alive") == -1)
value = value + ", Keep-Alive";
- webHeaders.SetInternal ("Connection", value);
+ webHeaders.RemoveAndAdd ("Connection", value);
}
}
webHeaders.RemoveInternal ("Content-Type");
return;
}
- webHeaders.SetInternal ("Content-Type", value);
+ webHeaders.RemoveAndAdd ("Content-Type", value);
}
}
if (val == "100-continue")
throw new ArgumentException ("100-Continue cannot be set with this property.",
"value");
- webHeaders.SetInternal ("Expect", value);
+ webHeaders.RemoveAndAdd ("Expect", value);
}
}
if (!sendChunked)
throw new ArgumentException ("SendChunked must be True", "value");
- webHeaders.SetInternal ("Transfer-Encoding", value);
+ webHeaders.RemoveAndAdd ("Transfer-Encoding", value);
}
}
webHeaders.RemoveInternal ("Transfer-Encoding");
} else if (sendChunked) {
continue100 = true;
- webHeaders.SetInternal ("Transfer-Encoding", "chunked");
+ webHeaders.RemoveAndAdd ("Transfer-Encoding", "chunked");
webHeaders.RemoveInternal ("Content-Length");
}
if (actualVersion == HttpVersion.Version11 && continue100 &&
servicePoint.SendContinue) { // RFC2616 8.2.3
- webHeaders.SetInternal ("Expect" , "100-continue");
+ webHeaders.RemoveAndAdd ("Expect" , "100-continue");
expectContinue = true;
} else {
webHeaders.RemoveInternal ("Expect");
servicePoint.ProtocolVersion == HttpVersion.Version10);
if (keepAlive && (version == HttpVersion.Version10 || spoint10)) {
- webHeaders.SetInternal (connectionHeader, "keep-alive");
+ webHeaders.RemoveAndAdd (connectionHeader, "keep-alive");
} else if (!keepAlive && version == HttpVersion.Version11) {
- webHeaders.SetInternal (connectionHeader, "close");
+ webHeaders.RemoveAndAdd (connectionHeader, "close");
}
webHeaders.SetInternal ("Host", actualUri.Authority);
req.Append (GetHeaders ());
string reqstr = req.ToString ();
byte [] bytes = Encoding.UTF8.GetBytes (reqstr);
+ Console.WriteLine (reqstr);
writeStream.SetHeaders (bytes, 0, bytes.Length);
}