我在终端创建了一个简单的服务器python -m SimpleHTTPServer 8000
当我发送命令curl -I http://localhost:8000
命令结果是一个请求:
127.0.0.1 - - [07/Aug/2016 14:53:22] "GET / HTTP/1.1" 200 -
但反应是HTTP/1.0
^{pr2}$
curl -v http://localhost:8000* Rebuilt URL to: http://localhost:8000/
* Trying ::1...
* connect to ::1 port 8000 failed: Connection refused
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8000 (#0)
> GET / HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.43.0
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Server: SimpleHTTP/0.6 Python/2.7.12
< Date: Sun, 07 Aug 2016 10:02:23 GMT
< Content-type: text/html; charset=utf-8
< Content-Length: 9747
<
...
* Closing connection 0
我们怎么解释?为什么服务器响应不是HTTP/1.1