diff options
author | Michael Brown | 2007-02-01 22:01:47 +0100 |
---|---|---|
committer | Michael Brown | 2007-02-01 22:01:47 +0100 |
commit | af3149d18ea9b34db9d651482ac7c59a8b768401 (patch) | |
tree | d7ba3244dea7f18e730713734e858a9524b49875 /src/net/tcp | |
parent | Add ability to read serial number from SMBIOS (diff) | |
download | ipxe-af3149d18ea9b34db9d651482ac7c59a8b768401.tar.gz ipxe-af3149d18ea9b34db9d651482ac7c59a8b768401.tar.xz ipxe-af3149d18ea9b34db9d651482ac7c59a8b768401.zip |
Allow queries in GET requests
Diffstat (limited to 'src/net/tcp')
-rw-r--r-- | src/net/tcp/http.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/net/tcp/http.c b/src/net/tcp/http.c index 7dd86c49..f7f0e44c 100644 --- a/src/net/tcp/http.c +++ b/src/net/tcp/http.c @@ -330,15 +330,17 @@ static void http_senddata ( struct stream_application *app, struct http_request *http = stream_to_http ( app ); const char *path = http->uri->path; const char *host = http->uri->host; - - if ( ! path ) - path = "/"; + const char *query = http->uri->query; len = snprintf ( buf, len, - "GET %s HTTP/1.1\r\n" + "GET %s%s%s HTTP/1.1\r\n" "User-Agent: gPXE/" VERSION "\r\n" "Host: %s\r\n" - "\r\n", path, host ); + "\r\n", + ( path ? path : "/" ), + ( query ? "?" : "" ), + ( query ? query : "" ), + host ); stream_send ( app, ( buf + http->tx_offset ), ( len - http->tx_offset ) ); |