|
Post by wassuuuub on Mar 23, 2004 14:35:53 GMT -5
I'm using HttpWebRequest (with HEAD) to check for broken links on certain websites. I'm receiving several 400 bad request responses.
With a network sniffer i can see that the initial response is a 301 (moved permanently). Then HttpWebRequest tries another request using the url given in the response (since request.AllowAutoRedirect=true by default). This second request causes the 400 (bad request) response because the url is not encoded before the request is sent.
I encode the url explicitly before making the initial request but the second request happens behind the scenes. Is there a way to avoid this error, by somehow encoding the url of a request generated due to a redirection?
Has anyone else encountered this problem, any suggestions, solutions? Thanks, TK
|
|
|
Post by Dangermouse on Mar 23, 2004 14:41:44 GMT -5
You might be better off in a C/C#/C++ (?) forums, its kind of dead round here.
|
|
|
Post by wassuuuub on Mar 23, 2004 16:32:20 GMT -5
I thought this is the c/c#/c++ forum. ??
|
|
|
Post by Loon on Mar 23, 2004 16:38:43 GMT -5
I think he means there's not many active people here that use C, and you're more likely to get a response on a more active programming forum.
But, you're still very welcome and if you don't need an answer anytime within the next few millenium, somebody will usually drag up the post and respond with something eventually.
|
|
Tewl
xTeam
C# & VB Developer
Posts: 495
|
Post by Tewl on Mar 25, 2004 13:35:46 GMT -5
im not sure but maybe it has something to do with the headers that are sent or not sent.
|
|