- $ curl 'http://127.0.0.1:5555/d d' -v
- * Trying 127.0.0.1...
- * TCP_NODELAY set
- * Connected to 127.0.0.1 (127.0.0.1) port 5555 (#0)
- > GET /d d HTTP/1.1
- > Host: 127.0.0.1:5555
- > User-Agent: curl/7.54.0
- > Accept: */*
- >
- * Empty reply from server
- * Connection #0 to host 127.0.0.1 left intact
- curl: (52) Empty reply from server
瞧,Empty reply from server。
发清楚明了问题之后,就有另一个问题值得思虑了:就 Node.js 会出现这种情况呢,照样其它一些 HTTP 办事器也会有这种情况呢。
于是拿小白鼠 Nginx 做了个实验。我写了这么一个设备:
- [error] 000001#0: ... upstream prematurely closed connection while reading response header from upstream.
- client: 10.10.10.10
- server: foo.com
- request: "GET /foo/bar?rmicmd,begin run clean docker images job HTTP/1.1"
- upstream: "http://..."
- server {
- listen 5555;
- location / {
- return 200 $uri;
- }
- }
接着也履行一遍 CURL,获得了如下的结不雅:
- $ curl 'http://127.0.0.1:5555/d d' -v
- * Trying 127.0.0.1...
- * TCP_NODELAY set
- * Connected to 127.0.0.1 (127.0.0.1) port 5555 (#0)
- > GET /d d HTTP/1.1
- > Host: 127.0.0.1:5555
- > User-Agent: curl/7.54.0
- > Accept: */*
- >
- < HTTP/1.1 200 OK
- < Server: openresty/1.11.2.1
- < Date: Tue, 12 Dec 2017 09:07:56 GMT
- < Content-Type: application/octet-stream
- < Content-Length: 4
- < Connection: keep-alive
- <
- * Connection #0 to host xcoder.in left intact
推荐阅读
黑客在渗入渗出一个网站时,受制于本身的黑客才能以及小我思维宽度,在想尽了一切办法后,却一无所得,最终就不得不走上了暴力破解这一条陆辜暴力破解的道理就是穷举法,其根本思惟是根据标题标部分前提>>>详细阅读
本文标题:Node.js中遇到含空格URL的神奇“Bug”——小范围深入HTTP协议
地址:http://www.17bianji.com/lsqh/39781.html
1/2 1

网友点评
精彩导读
科技快报
品牌展示