HTTP Protocol Violation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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 doesn’t fix
it?

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

Cheers,
 
Back
Top