"Curl 헤더정보 보기 -I, -i"의 두 판 사이의 차이

잔글 (Jmnote 사용자가 Curl 헤더정보 보기 -i 문서를 Curl 헤더정보 보기 -I 문서로 옮겼습니다)
2번째 줄: 2번째 줄:
;curl HTTP header 보기
;curl HTTP header 보기


==실행예시==
==헤더정보 보기 -I==
<source lang='console'>
<source lang='console'>
[root@zetawiki ~]# curl -I google.com
root@zetawiki:~# curl -I google.com
HTTP/1.1 301 Moved Permanently
HTTP/1.1 302 Found
Location: http://www.google.com/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Content-Type: text/html; charset=UTF-8
Date: Sat, 06 Oct 2012 03:14:42 GMT
Location: http://www.google.co.kr/?gfe_rd=cr&ei=NKoMV5TZCILD8AfCsqToCw
Expires: Mon, 05 Nov 2012 03:14:42 GMT
Content-Length: 261
Cache-Control: public, max-age=2592000
Date: Tue, 12 Apr 2016 07:56:36 GMT
Server: gws
Content-Length: 219
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
</source>
</source>
==헤더+본문 보기 -i==
<source lang='console'>
<source lang='console'>
[root@zetawiki ~]# curl -I 127.0.0.1
root@zetawiki:~# curl -i google.com
HTTP/1.1 200 OK
HTTP/1.1 302 Found
Date: Sat, 06 Sep 2014 07:35:34 GMT
Cache-Control: private
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.3.3
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Type: text/html; charset=UTF-8
Location: http://www.google.co.kr/?gfe_rd=cr&ei=gqoMV9mPLczU8AefxoxA
Content-Length: 259
Date: Tue, 12 Apr 2016 07:57:54 GMT
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.co.kr/?gfe_rd=cr&amp;ei=gqoMV9mPLczU8AefxoxA">here</A>.
</BODY></HTML>
</source>
</source>



2016년 4월 12일 (화) 17:01 판

curl 정보 보기
curl HTTP header 보기

1 헤더정보 보기 -I

root@zetawiki:~# curl -I google.com
HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Location: http://www.google.co.kr/?gfe_rd=cr&ei=NKoMV5TZCILD8AfCsqToCw
Content-Length: 261
Date: Tue, 12 Apr 2016 07:56:36 GMT

2 헤더+본문 보기 -i

root@zetawiki:~# curl -i google.com
HTTP/1.1 302 Found
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Location: http://www.google.co.kr/?gfe_rd=cr&ei=gqoMV9mPLczU8AefxoxA
Content-Length: 259
Date: Tue, 12 Apr 2016 07:57:54 GMT

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.co.kr/?gfe_rd=cr&amp;ei=gqoMV9mPLczU8AefxoxA">here</A>.
</BODY></HTML>

3 같이 보기

4 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}