Jim, Thanks for the pointer. It appears to work correctly now in my application.
Is the HttpWebResponse.ResponseUri always going to be the same Uri as was passed to the WebRequest.Create method? If the server does a redirect, is a new Uri created to reflect the actual responding Uri? Thanks, Erick ----- Original Message ----- From: "Jim Arnold" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 29, 2002 12:18 PM Subject: Re: [DOTNET] Character escapes and HttpWebResponse > If create the request from a Uri, you can have some control over this. Try > this: > > Uri uri = new Uri(uriString,true); > HttpWebRequest req = WebRequest.Create(uri); > > The bool in the Uri constructor tells it to not escape the string. The > Uri.UserEscaped property tells you if it has been escaped or not. > > Jim > > > -----Original Message----- > > From: Erick Thompson [mailto:[EMAIL PROTECTED]] > > Sent: 29 April 2002 19:44 > > To: [EMAIL PROTECTED] > > Subject: [DOTNET] Character escapes and HttpWebResponse > > > > > > Does anyone know the rules for how the HttpWebResponse > > handles the path and > > query escapes in URIs? If I request a page with the following format: > > > > http://www.somewhere.com/page.asp?#section > > > > the HttpWebResponse.ResponseUri.AbsoluteUri is > > > > http://www.somewhere.com/page.asp?%29section > > > > It looks like the # has been escaped. Is this the correct > > behaviour for this > > Uri? It doesn't seem like it to me. What rules does the > > HttpWebResponse > > object follow, as regards to when to escape characters and > > when not to. > > > > Thanks, > > Erick > > > > You can read messages from the DOTNET archive, unsubscribe > > from DOTNET, or > > subscribe to other DevelopMentor lists at http://discuss.develop.com. > > > > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or > subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.