-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExtendedHttpWebRequest Issue #3
Labels
Comments
[SelormeyPaul@2011/01/27] |
[UnknownUser@2011/02/12] |
[UnknownUser@2013/02/14] |
[UnknownUser@2013/05/16] |
Issue closed by SelormeyPaul with comment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
I have seen that you are using your ExtendedHttpWebRequest class to handle some features. I have a problem with this class, because it has broken my code. I have written the small example to explain my problem:
class Program
{
static void Main(string[] args)
{
// Everything works ok, here
{
WebRequest request = WebRequest.Create("http://google.com");
var httpRequest = (HttpWebRequest)request;
}
// Css document object is created
CssXmlDocument doc = new CssXmlDocument();
// InvalidCastException appears here
{
WebRequest request = WebRequest.Create("http://google.com");
var httpRequest = (HttpWebRequest)request;
}
}
}
This problem occurs because in CssXmlDocument there is following code:
SharpVectors.Net.ExtendedHttpWebRequest.Register();
SharpVectors.Net.DataWebRequest.Register();
I believe it is a bug, because HTTP and HTTPS schemes handling is implemented in .NET and in MSDN it is written: "The HttpWebRequest class is registered to service requests for HTTP and HTTPS schemes by default. Attempts to register a different WebRequest descendant for these schemes will fail.". This is certainly false, nevertheless these two schemes should not be overriden.
This work item was migrated from CodePlex
CodePlex work item ID: '390'
Vote count: '2'
The text was updated successfully, but these errors were encountered: