Click here to Skip to main content
15,900,108 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralCODE Pin
BOREC13-Dec-07 9:40
BOREC13-Dec-07 9:40 
GeneralRe: CODE Pin
Christian Graus13-Dec-07 11:30
protectorChristian Graus13-Dec-07 11:30 
GeneralCODE Pin
BOREC13-Dec-07 13:12
BOREC13-Dec-07 13:12 
GeneralRe: CODE Pin
Christian Graus13-Dec-07 13:22
protectorChristian Graus13-Dec-07 13:22 
GeneralFOUND CODE Pin
BOREC13-Dec-07 13:57
BOREC13-Dec-07 13:57 
GeneralRe: FOUND CODE Pin
Christian Graus13-Dec-07 16:12
protectorChristian Graus13-Dec-07 16:12 
QuestionWeb Exception ! Pin
AliAmjad13-Dec-07 6:51
AliAmjad13-Dec-07 6:51 
GeneralRe: Web Exception ! Pin
Dave Kreskowiak13-Dec-07 7:16
mveDave Kreskowiak13-Dec-07 7:16 
According to the error message, your code didn't generate the error, Google's web server did. HttpWebRequest is correct is saying so because it's following the parsing rules for HTTP 1.1 headers closer to the RFC specification than Google web server did putting the headers together. It's not Google's fault really, but the people who wrote the web server. There's an old recommendation in the RTF for HTTP 1.0 that said something like:

"the line terminator for message-header fields is the sequence CRLF. However, we recommend that applications, when parsing such headers, recognize a single LF as a line terminator and ignore the leading CR."

The headers comming back from the server ARE, according to which section of the RFC for HTTP you're reading, malformed.

You can turn on an option in your applications app.config file to force HttpWebRequest to relax it's parsing rules and suddenly start working with a large collection of web servers that were never "fixed" because "they worked before!"
<configuration> 
    <system.net> 
        <settings> 
            <httpWebRequest useUnsafeHeaderParsing="true" /> 
        </settings> 
    </system.net> 
</configuration>



A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007




GeneralRe: Web Exception ! Pin
AliAmjad13-Dec-07 8:04
AliAmjad13-Dec-07 8:04 
GeneralRe: Web Exception ! Pin
Dave Kreskowiak13-Dec-07 8:19
mveDave Kreskowiak13-Dec-07 8:19 
QuestionHow Send email with VB 2005 ? Pin
Orlando_Herrera13-Dec-07 6:02
Orlando_Herrera13-Dec-07 6:02 
AnswerRe: How Send email with VB 2005 ? Pin
Dave Kreskowiak13-Dec-07 6:56
mveDave Kreskowiak13-Dec-07 6:56 
QuestionUnable to load dll on computers which do not have Visual Studio installed Pin
Member 408492813-Dec-07 5:35
Member 408492813-Dec-07 5:35 
GeneralRe: Unable to load dll on computers which do not have Visual Studio installed Pin
Dave Kreskowiak13-Dec-07 6:53
mveDave Kreskowiak13-Dec-07 6:53 
QuestionRe: Unable to load dll on computers which do not have Visual Studio installed Pin
Member 408492813-Dec-07 8:58
Member 408492813-Dec-07 8:58 
GeneralRe: Unable to load dll on computers which do not have Visual Studio installed Pin
Dave Kreskowiak14-Dec-07 0:54
mveDave Kreskowiak14-Dec-07 0:54 
GeneralRe: Unable to load dll on computers which do not have Visual Studio installed Pin
Member 408492814-Dec-07 9:36
Member 408492814-Dec-07 9:36 
GeneralFlie dll Pin
ra_shieru13-Dec-07 4:58
ra_shieru13-Dec-07 4:58 
GeneralRe: Flie dll Pin
Dave Kreskowiak13-Dec-07 6:48
mveDave Kreskowiak13-Dec-07 6:48 
QuestionOptional Array in function not working in COM class?!? Pin
djdjoko13-Dec-07 4:22
djdjoko13-Dec-07 4:22 
AnswerRe: Optional Array in function not working in COM class?!? Pin
Dave Kreskowiak13-Dec-07 6:46
mveDave Kreskowiak13-Dec-07 6:46 
GeneralString to Datagridviewcell Conversion Pin
VB 8.013-Dec-07 1:09
VB 8.013-Dec-07 1:09 
GeneralRe: String to Datagridviewcell Conversion Pin
Dave Kreskowiak13-Dec-07 1:48
mveDave Kreskowiak13-Dec-07 1:48 
GeneralRe: String to Datagridviewcell Conversion Pin
VB 8.014-Dec-07 0:42
VB 8.014-Dec-07 0:42 
GeneralRe: String to Datagridviewcell Conversion Pin
Dave Kreskowiak14-Dec-07 0:48
mveDave Kreskowiak14-Dec-07 0:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.