我想知道使用从IPv4服务器到IPv6服务器的HTTP GET
请求的标头格式之间的区别吗?通过IPv6的HTTP请求
现在,我目前使用以下格式:
"GET /"+myFileToDownLoad+" HTTP/1.1\r\n"+
"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*\r\n"
+"Referer: http://"+myDstIp+"/\r\n"
+"Accept-Language: he\r\n"
+"Accept-Encoding: gzip, deflate\r\n"
+"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\r\n"
//+"Host: "+myDstIp+"\r\n"
+"Host: "+((myHost==null)?myDstIp:myHost)+"\r\n"
+"Connection: Close\r\n\r\n";
所以,如果我想使用IPv6服务器,是有必要更改格式?
嗨Lyth,谢谢你的回应。 –
我可以知道这反映在标题格式.... –
@ramuluponnam:对于您的代码,它可能看起来像: 'if(isIPv6(myDstIp))myDstIp ='['+ myDstIp +']'' – Lyth