Thread Socket: Verbindungsproblem? (9 answers)
Opened by Gast at 2004-04-17 13:25

jan
 2004-04-17 17:41
#29222 #29222
User since
2003-08-04
2536 Artikel
ModeratorIn
[Homepage] [default_avatar]
echt? das ist aber, denke ich, nicht sonderlich sauber:
Quote
The absoluteURI form is only allowed when the request is being made to a proxy. The proxy is requested to forward the request and return the response. If the request is GET or HEAD and a prior response is cached, the proxy may use the cached message if it passes any restrictions in the Expires header field. Note that the proxy may forward the request on to another proxy or directly to the server specified by the absoluteURI. In order to avoid request loops, a proxy must be able to recognize all of its server names, including any aliases, local variations, and the numeric IP address. An example Request-Line would be:


GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.0

The most common form of Request-URI is that used to identify a resource on an origin server or gateway. In this case, only the absolute path of the URI is transmitted (see Section 3.2.1, abs_path). For example, a client wishing to retrieve the resource above directly from the origin server would create a TCP connection to port 80 of the host "www.w3.org" and send the line:

GET /pub/WWW/TheProject.html HTTP/1.0

followed by the remainder of the Full-Request. Note that the absolute path cannot be empty; if none is present in the original URI, it must be given as "/" (the server root).

http://ftp.ics.uci.edu/pub/ietf/http/rfc1945.html

eine url an der stelle anzugeben, ist für die kommunikation via proxys gedacht - nicht für den eigentlichen request.
ich würde irgendwas wie
Code: (dl )
print $socket "GET $path HTTP/1.0" . CRLF . "Host: $host" . CRLF . CRLF;

benutzen - ungetestet ;)
das ist zwar nicht http/1.0-konform, weil 1.0 den host-request-header nicht kennt, wird aber allgemeinhin als erweiterung unterstützt und ist, denke ich, sauberer.

View full thread Socket: Verbindungsproblem?