curl -c文件的输出如下:
#HttpOnly_.mysite.net TRUE / TRUE 0 mywebsessionid 000000-90ae-4ba5-b5be-4d10be6be098
#HttpOnly_.mysite.net TRUE / TRUE 0 mysitepkey 0000_gv-X8nOvg9KgMLNWA==
因为两个值都是真的我得到"未经授权"当我手动编辑" TRUE / FALSE"我得到200.这可能是TRUE / TRUE的原因。
1st =命令
curl -c cookie.txt -d "username=user" -d "password=pass" https://www.example.com/login
第二名=命令
curl -b cookie.txt -v -X GET http://mysite/data/myfile/view -H "Content-type: application/json"
htttp标头输出
> "Content-type: application/json"
* Trying 168.14.61.148...
* Connected to login.mysite.come (168.14.61.148) port 8080 (#0)
> GET /login.mysite.com HTTP/1.1
> User-Agent: curl/7.40.0
> Host: mysite.com:8080
> Accept: */*
> Cookie: mykey=ehhf3GYqNbIz5rMixfT1Pg22;
> X-MYSITE-SESSION:323158ce-da52-41b8-9c66-a897fcb22222;
> Content-type: application/json
>
< HTTP/1.1 200 OK
< Cache-Control: no-cache, no-store, must-revalidate
< Content-Type: application/xml
< Date: Sun, 27 Sep 2015 22:05:25 GMT
< Expires: 0
< Pragma: no-cache
< Server: Apache-Coyote/1.1
< Vary: Accept-Encoding
< transfer-encoding: chunked
< Connection: keep-alive
答案 0 :(得分:1)
第一个为TRUE,在第二列是&#34; tailmatch&#34;是或否。
第二个为TRUE,在第四列中是&#34; secure&#34; cookie是或否。安全cookie只能通过HTTPS发送。