Hi, I was just reading through System.Net.WebRequest.cs and I stumbled over the following section in Create(Uri requestUri, bool useUriBase):
// Copy the prefix list so that if it is updated it will
// not affect us on this thread.
ArrayList prefixList = PrefixList;
Maybe I misunderstood the intention, but I think this does not really prevent a concurrent modification.
Both
RegisterPrefix(string prefix, IWebRequestCreate creator)
and
UnregisterPrefix(string prefix)
in that same file use a PrefixList.Clone() instead, which really does make sure that it's not modified externally.
Kind regards
Adrian
Hi, I was just reading through
System.Net.WebRequest.csand I stumbled over the following section inCreate(Uri requestUri, bool useUriBase):Maybe I misunderstood the intention, but I think this does not really prevent a concurrent modification.
Both
RegisterPrefix(string prefix, IWebRequestCreate creator)and
UnregisterPrefix(string prefix)in that same file use a
PrefixList.Clone()instead, which really does make sure that it's not modified externally.Kind regards
Adrian