Re: Understanding HTTP




"Roedy Green" <my_email_is_posted_on_my_website@xxxxxxxxxxxxxx> wrote in
message news:l34ds19ft8r8a84191e8otlkl9b7i6nshq@xxxxxxxxxx
> On Thu, 12 Jan 2006 14:40:27 +0100, Andrea Desole
> <news@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote, quoted or indirectly quoted
> someone who said :
>
>>I don't think so. And I don't seem to have problems with my Firefox
>>either.
>>But, looking at the error message, doesn't it look more like the server
>>is trying to access it, and not the client?
>
> Perhaps under some circumstance the server loses track of the absolute
> position, so that relative URLS don't work.
>
> The server must somehow track that for each user? How would a browser
> resolve it without a knowledge of the file structure? Yet how could a
> server keep track of every user's current position indefinitely?

When an HTTP client connects to an HTTP server, one of the operations a
client may perform is a GET operation. This is the operation typically used
to retrieve a web page. The GET operation takes one parameter, which is some
identifier for the resource to get. There is no concept of "absolute" or
"relative" path in this case, and the identifier does not even need to
reflect a path in any sense (though in most implementations, the identifier
is a path describing path to the desired HTML file).

A web browser does not only act as an HTTP client, but also as an HTML
parser and renderer. HTML does define a concept of a relative URL. It is up
to the browser to note where the HTML file was retrieved from, and from
there, to translate the relative URL into an "absolute" path that is valid
for a GET operation.

It is not uncommon for the webserver to do some semi-complex
manipulation on the argument to GET to determine what file to retrieve. For
example, the server might respond to a request like "GET ~owong/foo.html" by
loading the file locate at "/usr/home/owong/wwwroot/foo.html".

Similarly, it might respond to a request like "GET me_a_random_number"
by randomly generating a number, and returning that number, and not actually
access the file system at all.

- Oliver


.



Relevant Pages

  • Re: Change included code
    ... Index.php is basically an html file uses a linked css file and when its included in the new file its referencing a css file in the wrong spot. ... It would actually be a bit more trouble since any time I want to upload to the server to test I will have to change the link. ... Would be easier just to have php just add "../" to one spot instead manually doing it every time I upload to the server. ...
    (comp.lang.php)
  • Crashing any Windows NT TSE running MetaFrame 1.8
    ... I tried to contact Citrix about this bug i found, ... logging on the server. ... The changes are made in the html file that is used to ...
    (NT-Bugtraq)
  • Re: Change included code
    ... its included in the new file its referencing a css file in the ... upload to the server to test I will have to change the link. ... be easier just to have php just add "../" to one spot instead ... in the main html file I have ...
    (comp.lang.php)
  • Re: Change included code
    ... Index.php is basically an html file uses a linked css file and when its included in the new file its referencing a css file in the wrong spot. ... It would actually be a bit more trouble since any time I want to upload to the server to test I will have to change the link. ... Would be easier just to have php just add "../" to one spot instead manually doing it every time I upload to the server. ...
    (comp.lang.php)
  • Nitpicking bad jargon such as "lvalue" (was months ago: Requesting advice how to clean up C code for
    ... Your news client ... My HTTP client is ... database server, which might loosely be considered a news server. ... Note that "evaluation" is done at compile time, ...
    (comp.lang.c)