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

잔글 (봇: 자동으로 텍스트 교체 (-<source lang='cli'> +<source lang='console'>))
잔글 (봇: 자동으로 텍스트 교체 (-<source +<syntaxhighlight , -</source> +</syntaxhighlight>))
 
(사용자 2명의 중간 판 7개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{소문자}}
;curl 정보 보기
;curl 정보 보기
;curl HTTP header 보기
;curl HTTP header 보기


==실행예시==
==헤더정보 보기 -I==
<source lang='console'>
<syntaxhighlight 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
</syntaxhighlight>
Content-Length: 219
 
X-XSS-Protection: 1; mode=block
==헤더+본문 보기 -i==
X-Frame-Options: SAMEORIGIN
<syntaxhighlight lang='console'>
</source>
root@zetawiki:~# curl -i google.com
<source lang='console'>
HTTP/1.1 302 Found
[root@zetawiki ~]# curl -I 127.0.0.1
Cache-Control: private
HTTP/1.1 200 OK
Date: Sat, 06 Sep 2014 07:35:34 GMT
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
</source>
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>
</syntaxhighlight>


==같이 보기==
==같이 보기==
*[[curl]]
*[[리눅스 curl]]
*[[HTTP 헤더 필드]]
*[[HTTP 헤더 필드]]
*[[아파치 ServerTokens Prod, ServerSignature Off]]
*[[아파치 ServerTokens Prod, ServerSignature Off]]


==참고 자료==
==참고==
*http://serverfault.com/questions/249483/shell-command-to-see-the-http-headers
*http://serverfault.com/questions/249483/shell-command-to-see-the-http-headers


[[분류: curl]]
[[분류: curl]]

2020년 12월 15일 (화) 14:30 기준 최신판

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 }}