»Ë»Ñ Æ÷·³
°³¹ßÀÚÆ÷·³ ÀÔ´Ï´Ù.
  • ºÏ¸¶Å© ¾ÆÀÌÄÜ

¶È°°Àº URLÀ» ¾Èµå·ÎÀÌµå ¾Û¿¡¼­ ÇÒ¶§¿Í À¥»çÀÌÆ®¿¡¼­ ÇÒ¶§ Http response header °ªÀÌ ´Ù¸¥ ÀÌÀ¯´Â...?5

  • [* ºñȸ¿ø *]
  • µî·ÏÀÏ 2013-08-23 11:53
  • Á¶È¸¼ö 1112

"http://goo.gl/XNK93Q" ¶ó´Â ´ÜÃà URLÀ»

¾Èµå·ÎÀ̵å App¿¡¼­ È£ÃâÇÒ¶§´Â Location °á°ú°ªÀÌ ¾øÀ¸³ª..
http://www.webconfs.com/http-header-check.php »çÀÌÆ®¸¦ ÅëÇØ header Á¤º¸¸¦ ºÐ¼®Çغ¸¸é Location°ªÀÌ ³ª¿À³×¿ä..

¿Ö ´Ù¸¥ °á°ú°¡ ³ª¿À´Â °ÍÀϱî¿ä..?

¾Èµå·ÎÀ̵å App¿¡¼­ÀÇ ÄÚµå´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
HttpClient myclient = new DefaultHttpClient();
String url = "http://goo.gl/XNK93Q";            
HttpGet myget = new HttpGet(url);
HttpResponse response = null;                  

response = myclient.execute(myget);
HttpEntity entity = response.getEntity();

System.out.println("response:-------------------");
System.out.println(response.getStatusLine());
headers = response.getAllHeaders();
for(Header h:headers){
System.out.println(h.getName() + ": " + h.getValue());
}

ÀÌ ÄÚµå·Î ·Î±×¸¦ Âï¾îº» °á°ú°ªÀº..
08-23 10:44:22.271: I/System.out(24538): request:-------------------
08-23 10:44:22.271: I/System.out(24538): GET http://goo.gl/XNK93Q HTTP/1.1
08-23 10:44:23.703: I/System.out(24538): response:-------------------
08-23 10:44:23.703: I/System.out(24538): HTTP/1.1 200 OK
08-23 10:44:23.703: I/System.out(24538): Cache-Control: public, max-age=18
08-23 10:44:23.703: I/System.out(24538): Content-Type: text/html; charset=utf-8
08-23 10:44:23.713: I/System.out(24538): Expires: Fri, 23 Aug 2013 01:44:43 GMT
08-23 10:44:23.713: I/System.out(24538): Last-Modified: Fri, 23 Aug 2013 01:43:43 GMT
08-23 10:44:23.713: I/System.out(24538): Vary: *
08-23 10:44:23.713: I/System.out(24538): X-Frame-Options: SAMEORIGIN
08-23 10:44:23.713: I/System.out(24538): Date: Fri, 23 Aug 2013 01:44:24 GMT
08-23 10:44:23.713: I/System.out(24538): Content-Length: 47292

±×·±µ¥ À§¿¡ ÀûÀº »çÀÌÆ®¸¦ ÅëÇؼ­ ¾òÀº °á°ú°ª¿¡´Â Location Á¤º¸°¡ ÀÖ½À´Ï´Ù.
HTTP/1.0 301 Moved Permanently =>
Content-Type => text/html; charset=UTF-8
Cache-Control => no-cache, no-store, max-age=0, must-revalidate
Pragma => no-cache
Expires => Fri, 01 Jan 1990 00:00:00 GMT
Date => Fri, 23 Aug 2013 01:43:13 GMT
Location => http://stackoverflow.com/questions/14749307/302-redirect-from-http-to-https-in-android-using-dropbox-short-hyperlinks
X-Content-Type-Options => nosniff
X-Frame-Options => SAMEORIGIN
X-XSS-Protection => 1; mode=block
Server => GSE
Alternate-Protocol => 80:quic


¸®ÅϵǴ Status°ªÀÌ ¿Ö Á¦ app¿¡¼­´Â 200À¸·Î ¿À°í Å×½ºÆ® »çÀÌÆ®¿¡¼­´Â 301·Î ¿Ã±î¿ä..?

0
ÃßõÇϱ⠴ٸ¥ÀÇ°ß 0
|
°øÀ¯¹öÆ°

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 »ÏÀÌ

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 [* ºñȸ¿ø *]

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 Á¦ÀÏ»ý¸í

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 [* ºñȸ¿ø *]

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ¼¼¸ð_
  • ¾Ë¸² ¿å¼³, »óó ÁÙ ¼ö ÀÖ´Â ¾ÇÇÃÀº »ï°¡ÁÖ¼¼¿ä.
©¹æ »çÁø  
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û ¸ñ·Ïº¸±â