summaryrefslogtreecommitdiffstats
path: root/src/net/tcp/http.c
diff options
context:
space:
mode:
authorH. Peter Anvin2008-03-31 14:01:08 +0200
committerH. Peter Anvin2008-03-31 14:01:08 +0200
commitb107637008d15e00a4d95cdb5c8f5c11fda490f7 (patch)
tree687226894f865910866854bd3dfd3a88152e287d /src/net/tcp/http.c
parent[Settings] Expose SMBIOS via settings API (diff)
downloadipxe-b107637008d15e00a4d95cdb5c8f5c11fda490f7.tar.gz
ipxe-b107637008d15e00a4d95cdb5c8f5c11fda490f7.tar.xz
ipxe-b107637008d15e00a4d95cdb5c8f5c11fda490f7.zip
[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.
Diffstat (limited to 'src/net/tcp/http.c')
-rw-r--r--src/net/tcp/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/tcp/http.c b/src/net/tcp/http.c
index db92e9eb..4dc1ab73 100644
--- a/src/net/tcp/http.c
+++ b/src/net/tcp/http.c
@@ -393,7 +393,7 @@ static void http_step ( struct process *process ) {
if ( xfer_window ( &http->socket ) ) {
process_del ( &http->process );
if ( ( rc = xfer_printf ( &http->socket,
- "GET %s%s%s HTTP/1.1\r\n"
+ "GET %s%s%s HTTP/1.0\r\n"
"User-Agent: gPXE/" VERSION "\r\n"
"Host: %s\r\n"
"\r\n",