See 'GET /url...' location in the output in the first example:

j.

$ ftp -o /dev/null -M -d http://ftp.eu.openbsd.org/pub/OpenBSD/snapshots/amd64/
host ftp.eu.openbsd.org, port (null), path pub/OpenBSD/snapshots/amd64/, save 
as /dev/null, auth (null).
Trying 77.238.36.16...
Requesting http://ftp.eu.openbsd.org/pub/OpenBSD/snapshots/amd64/GET 
/pub/OpenBSD/snapshots/amd64/ HTTP/1.0
Host: ftp.eu.openbsd.org
User-Agent: OpenBSD ftp


received 'HTTP/1.1 200 OK'
received 'Date: Thu, 08 Dec 2016 18:06:35 GMT'
received 'Server: Apache/2.2.22 (Ubuntu)'
received 'Vary: Accept-Encoding'
received 'Content-Length: 6018'
received 'Connection: close'
received 'Content-Type: text/html;charset=UTF-8'
6018 bytes received in 0.01 seconds (670.27 KB/s)

$ ftp -o /dev/null -M -d -V 
http://ftp.eu.openbsd.org/pub/OpenBSD/snapshots/amd64/
host ftp.eu.openbsd.org, port (null), path pub/OpenBSD/snapshots/amd64/, save 
as /dev/null, auth (null).
GET /pub/OpenBSD/snapshots/amd64/ HTTP/1.0
Host: ftp.eu.openbsd.org
User-Agent: OpenBSD ftp


received 'HTTP/1.1 200 OK'
received 'Date: Thu, 08 Dec 2016 18:06:44 GMT'
received 'Server: Apache/2.2.22 (Ubuntu)'
received 'Vary: Accept-Encoding'
received 'Content-Length: 6018'
received 'Connection: close'
received 'Content-Type: text/html;charset=UTF-8'

Index: fetch.c
===================================================================
RCS file: /cvs/src/usr.bin/ftp/fetch.c,v
retrieving revision 1.149
diff -u -p -u -p -r1.149 fetch.c
--- fetch.c     20 Aug 2016 20:18:42 -0000      1.149
+++ fetch.c     8 Dec 2016 18:16:44 -0000
@@ -625,7 +625,7 @@ noslash:
 #endif /* !SMALL */
 
        if (verbose)
-               fprintf(ttyout, "Requesting %s", origline);
+               fprintf(ttyout, "Requesting %s\n", origline);
 
        /*
         * Construct and send the request. Proxy requests don't want leading /.


$ /home/jirib/cvs/openbsd-src/usr.bin/ftp/obj/ftp -o /dev/null -M -d 
http://ftp.eu.openbsd.org/pub/OpenBSD/snapshots/amd64/
host ftp.eu.openbsd.org, port (null), path pub/OpenBSD/snapshots/amd64/, save 
as /dev/null, auth (null).
Trying 77.238.36.56...
Requesting http://ftp.eu.openbsd.org/pub/OpenBSD/snapshots/amd64/
GET /pub/OpenBSD/snapshots/amd64/ HTTP/1.0
Host: ftp.eu.openbsd.org
User-Agent: OpenBSD ftp


received 'HTTP/1.1 200 OK'
received 'Date: Thu, 08 Dec 2016 18:10:51 GMT'
received 'Server: Apache/2.2.22 (Ubuntu)'
received 'Vary: Accept-Encoding'
received 'Content-Length: 6018'
received 'Connection: close'
received 'Content-Type: text/html;charset=UTF-8'
6018 bytes received in 0.00 seconds (49.48 MB/s)

And comparison with curl:

$ curl -i -v -o /dev/null -s 
http://ftp.eu.openbsd.org/pub/OpenBSD/snapshots/amd64/                          
                
*   Trying 77.238.36.56...
* TCP_NODELAY set
* Connected to ftp.eu.openbsd.org (77.238.36.56) port 80 (#0)
> GET /pub/OpenBSD/snapshots/amd64/ HTTP/1.1
> Host: ftp.eu.openbsd.org
> User-Agent: curl/7.51.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Thu, 08 Dec 2016 18:25:18 GMT
< Server: Apache/2.2.22 (Ubuntu)
< Vary: Accept-Encoding
< Content-Length: 6018
< Content-Type: text/html;charset=UTF-8
<
{ [2724 bytes data]
* Curl_http_done: called premature == 0
* Connection #0 to host ftp.eu.openbsd.org left intact

Reply via email to