NJDude Expert Licensed User Longtime User Mar 2, 2012 #1 Does ".SetHeader" adds CR + LF at the end of the string?, for example, if I set the header to be: Code: req.SetHeader("User-Agent:", "MyBrowser") The server reports that the lenght of the string is 11 instead of nine, in other words, no matter what you enter there are always 2 more characters. NOTE TO ADD: I found the answer, req.SetHeader adds a colon and a space BEFORE the variable, using my example above, if you do that, the server reports ": MyBrowser", is that a bug? Last edited: Mar 2, 2012
Does ".SetHeader" adds CR + LF at the end of the string?, for example, if I set the header to be: Code: req.SetHeader("User-Agent:", "MyBrowser") The server reports that the lenght of the string is 11 instead of nine, in other words, no matter what you enter there are always 2 more characters. NOTE TO ADD: I found the answer, req.SetHeader adds a colon and a space BEFORE the variable, using my example above, if you do that, the server reports ": MyBrowser", is that a bug?
Erel B4X founder Staff member Licensed User Longtime User Mar 3, 2012 #2 The standard format of headers is: key: value You should not add the colon yourself. Upvote 0