$ cat mass_insert.txt
*3
$3
SET
$4
key1
$6
value1
*3
$3
SET
$4
key2
$6
value2
$ cat mass_insert.txt | nc localhost 6379
ご覧のとおり、ファイルに一括挿入するためのredisコマンドがありますmass_insert.text
。netcatcat
に送信すると、コマンドはredisに正常に送信されますが、応答はダンプされません。問題はなぜですか?
単純なgoogle.com
HEAD リクエストはnetcat
問題なく動作します。つまり、レスポンスをダンプします -
$ printf "HEAD / HTTP/1.0\r\n\r\n" | nc google.com 80
HTTP/1.0 302 Found
Location: http://www.google.co.in/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Set-Cookie: PREF=ID=cac6fac8de9b5d0c:FF=0:TM=1365352115:LM=1365352115:S=CVuSzOK8mrsfFczI; expires=Tue, 07-Apr-2015 16:28:35 GMT; path=/; domain=.google.com
Set-Cookie: NID=67=K5KjAFxuDP5epZKDdvSf4oCe4FRP1AL8LG_9MEdsArn4Oz_UBG69H0KOMUiKLuVN-hH4NIUvHOLgmfh_82P5v6Nh-sGFrGXyCnQz0zD-Sj_QbzxQ6NIK0rahsxjvyTn7; expires=Mon, 07-Oct-2013 16:28:35 GMT; path=/; domain=.google.com; HttpOnly
P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info."
Date: Sun, 07 Apr 2013 16:28:35 GMT
Server: gws
Content-Length: 221
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN