* HttpClientChannel.cs HttpServer.cs HttpServerChannel.cs: Fixed some warnings.
svn path=/trunk/mcs/; revision=18145
+2003-09-17 Lluis Sanchez Gual <lluis@ximian.com>
+
+ * HttpHelper.cs: Fixed bug #48468. Patch by Jean-Marc Andre.
+ * HttpClientChannel.cs HttpServer.cs HttpServerChannel.cs: Fixed some warnings.
+
2003-08-22 Lluis Sanchez Gual <lluis@ximian.com>
* HttpClientChannel.cs: Changed text for user-agent header (removed references
private const String ProxyNameKey = "proxyname";
private const String ProxyPortKey = "proxyport";
- // If above keys get modified be sure to modify, the KeySet property on this
- // class.
- private static ICollection s_keySet = null;
-
-
// Settings
private int _channelPriority = 1; // channel priority
private String _channelName = "http"; // channel name
// settings
private bool _useChunked = false;
- private bool _useKeepAlive = true;
+// private bool _useKeepAlive = true;
internal HttpClientTransportSink(HttpClientChannel channel, String channelURI) : base()
{
//request.Expect = "100-Continue";
//This caused us some troubles with the HttpWebResponse class
- //maybe its fixed now.
+ //maybe its fixed now. TODO
//request.KeepAlive = _useKeepAlive;
request.KeepAlive = false;;
int Pos;
ObjectURI = null;
+ string ChannelURI = null;
if(StartsWithHttp(URL))
{
Pos = URL.IndexOf("/",7);
+ if(Pos >= 0)
+ {
+ ObjectURI = URL.Substring(Pos);
+ ChannelURI = URL.Substring(0, Pos);
+ }
+ else ChannelURI = URL;
}
- else
- {
- Pos = URL.IndexOf("/",0);
- }
-
- if(Pos >= 0)
- {
- ObjectURI = URL.Substring(Pos + 1);
- return URL.Substring(0,Pos);
- }
- return URL;
+ return ChannelURI;
}
internal sealed class HttpServer
{
- public int port;
private TcpListener listener=null;
private const int nTimeOut = 1000;
private IServerChannelSink _sinkChain = null;
private bool _wantsToListen = true;
- private bool _bHooked = false; // has anyone hooked into the channel?
private TcpListener _tcpListener;
private Thread _listenerThread;
private bool _bListening = false; // are we listening at the moment?
- private Exception _startListeningException = null; // if an exception happens on the listener thread when attempting
// to start listening, that will get set here.
private AutoResetEvent _waitForStartListening = new AutoResetEvent(false);