What exactly does the Response.Redirect ("~ / ...") response put in the HTTP response?

I just finished reading the URL against the URI and URN under more concise conditions , and it really helped to understand the difference between the three conditions. Since then, I have removed the RFC2141 and RFC2616 specifications and the Microsoft Response.Redirect Method to answer the next question with confidence.

Given this line of code:

Response.Redirect("~/Foo.aspx");

And this HTTP response result (cropped for context):

Status = Found - 302 Date = Wed, 24 Nov.
2010 17:27:58 GMT
Server = Microsoft-IIS / 6.0
X-Powered-By = ASP.NET
X-Network NAS-Version = 2.0.50727
Location = / MyWebApp / Foo.aspx

Which name (s) most correctly describes what was placed in the Location heading?

URL? URI? Urn? URC? What is it?

+3
source share
5 answers

This is a relative URI.

This is also a URL, because it can be used in this context to search for a resource, as well as to identify it, but in fact it makes little sense to talk about URLs these days - the difference is rather a matter of what you do with it that it is in itself, and the URL is always a URI.

+2
source

. ( ) - URI, , ( ) , (: request:: protocol, browser:: request:: domain, response:: locationHeader) URL-, .

+1

Url, ~/ ( "http" ) , Location Uri.

0

~//MyWebApp/Foo.aspx, , HTTP; , , - , - URL-, http://.

0

URL- URL-. ~/, URL-, ~/foo.aspx, IIS.

0

Source: https://habr.com/ru/post/1776743/


All Articles