471,327 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,327 software developers and data experts.

HTTP Protocol Violation

I had the trouble a long time, and hope some experts can really help me.

I used HttpWebRequest/HttpWebResponse to get the content of an URL. It
throws "HTTP Protocol Violation". Even I set useUnsafeHeaderParsing =
"true" in configuration file, the problem remain. The content shows well in
IE. (My content-type is text/plain)

I contacted with the device provider. They told me that HTTP return does not
have HTTP header in order to keep backward compatibility.
My question is:
- Do we have an alternative way to get content of the URL other than
Vulnerable Microsoft HttpWebRequest/HttpWebResponse?
- The problem had been here for a long time, why Microsoft doesn’t fix it?
(Even it is not standard HTTP, but you can display in IE???)
- Any persion overwrite MS BeginGetResponse/EndGetResponse event?

Thanks

Feb 20 '06 #1
1 1606
Thus wrote Qingdong Z.,
I had the trouble a long time, and hope some experts can really help
me.

I used HttpWebRequest/HttpWebResponse to get the content of an URL. It
throws "HTTP Protocol Violation". Even I set useUnsafeHeaderParsing =
"true" in configuration file, the problem remain. The content shows
well in IE. (My content-type is text/plain)
IE doesn't use System.Net.
I contacted with the device provider. They told me that HTTP return
does not have HTTP header in order to keep backward compatibility.
With what? More broken HTTP implementations? Any applicaton level firewall
might simply reject this stuff if configured to do so.
My question is:
- Do we have an alternative way to get content of the URL other than
Vulnerable Microsoft HttpWebRequest/HttpWebResponse?
Roll your own HTTP implementation based on System.Net.Sockets. Or try another
HTTP implementation like Indy.
- The problem had been here for a long time, why Microsoft doesnt fix
it?


There's nothing to fix. Why support broken stuff?

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Feb 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Henrik | last post: by
reply views Thread by Helen | last post: by
1 post views Thread by Khadim | last post: by
3 posts views Thread by JansenH | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.