Преглед изворни кода

[http] gPXE is a HTTP/1.0 client, not a HTTP/1.1 client

gPXE is not compliant with the HTTP/1.1 specification (RFC 2616),
since it lacks support for "Transfer-Encoding: chunked".  gPXE is,
however, compliant with the HTTP/1.0 specification (RFC 1945), which
does not require "Transfer-Encoding: chunked" to be supported.

The only HTTP/1.1 feature that gPXE uses is the "Host:" header, but
servers universally accept that one from HTTP/1.0 clients as an
optional extension (it is obligatory for HTTP/1.1).  gPXE does not,
for example, appear to support connection caching.  Advertising as a
HTTP/1.0 client will typically make the server close the connection
immediately upon sending the last data, which is actually beneficial
if we aren't going to keep the connection alive anyway.
tags/v0.9.4
H. Peter Anvin пре 16 година
родитељ
комит
b107637008
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1
    1
      src/net/tcp/http.c

+ 1
- 1
src/net/tcp/http.c Прегледај датотеку

@@ -393,7 +393,7 @@ static void http_step ( struct process *process ) {
393 393
 	if ( xfer_window ( &http->socket ) ) {
394 394
 		process_del ( &http->process );
395 395
 		if ( ( rc = xfer_printf ( &http->socket,
396
-					  "GET %s%s%s HTTP/1.1\r\n"
396
+					  "GET %s%s%s HTTP/1.0\r\n"
397 397
 					  "User-Agent: gPXE/" VERSION "\r\n"
398 398
 					  "Host: %s\r\n"
399 399
 					  "\r\n",

Loading…
Откажи
Сачувај