{"id":105422,"date":"2020-05-22T10:47:33","date_gmt":"2020-05-22T02:47:33","guid":{"rendered":"http:\/\/4563.org\/?p=105422"},"modified":"2020-05-22T10:47:33","modified_gmt":"2020-05-22T02:47:33","slug":"%e4%b8%80%e6%ad%a5%e6%ad%a5%e6%89%8b%e5%86%99-http-%e5%ba%95%e5%b1%82%e5%ae%a2%e6%88%b7%e7%ab%af","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=105422","title":{"rendered":"\u4e00\u6b65\u6b65\u624b\u5199 http \u5e95\u5c42\u5ba2\u6237\u7aef"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u4e00\u6b65\u6b65\u624b\u5199 http \u5e95\u5c42\u5ba2\u6237\u7aef               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ChristopherWu <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u9879\u76ee\u5730\u5740\u8bf7\u770b\uff1a https:\/\/github.com\/YongHaoWu\/http_client<\/p>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u60f3\u60f3\u6d4f\u89c8\u5668\u505a\u4e86\u4ec0\u4e48\u4e8b\u60c5\uff0c \u65e0\u975e\u5c31\u662f\u6839\u636e\u8f93\u5165 url\uff0c\u53d1\u9001\u8bf7\u6c42\u5230\u5bf9\u65b9\u670d\u52a1\u5668\uff0c \u83b7\u53d6\u76f8\u5e94\u7684\u6587\u4ef6\uff0c\u5c55\u793a\u5185\u5bb9\u7ed9\u7528\u6237\u3002<\/p>\n<p>\u5148\u56de\u987e\u4e0b\u6211\u4e00\u7bc7\u6587\u7ae0\u91cc\u8bb2\u89e3\u7684 <code>URI Scheme<\/code>\u3002<\/p>\n<h4>\u4ec0\u4e48\u662f URI \uff1f<\/h4>\n<p><strong>Uniform Resource Identifier<\/strong> (<strong>URI<\/strong>\uff0c\u7edf\u4e00\u8d44\u6e90\u6807\u5fd7\u7b26) \uff0c\u662f\u7528\u6765\u6807\u8bc6\u8d44\u6e90\u7684\u5b57\u7b26\u4e32\uff0c\u89c4\u5b9a\u4e86\u4ee5\u4e0b\u6587\u6cd5\uff1a<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200528_5ecf602cbcb21.png\" alt=\"\u4e00\u6b65\u6b65\u624b\u5199 http \u5e95\u5c42\u5ba2\u6237\u7aef\" \/><\/p>\n<p>\u4e0a\u56fe\u53ef\u89c1\uff0c\u6709\u6548\u7684 <code>URI<\/code> \u81f3\u5c11\u5305\u542b <code>scheme<\/code>\uff0c<code>:<\/code>\u4ee5\u53ca <code>path(\u8def\u5f84)<\/code>\uff0c\u5982\u7ecf\u5178\u7684\u89e6\u53d1\u64cd\u4f5c\u7cfb\u7edf\u53d1\u90ae\u4ef6\u52a8\u4f5c\u7684mailto \u683c\u5f0f\uff1a<\/p>\n<pre><code>  mailto:[email&#160;protected]   \u2514\u2500\u252c\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518   scheme     path <\/code><\/pre>\n<p>\u5176\u4ed6\u5c31\u662f\u53ef\u9009\u7684\u7ec4\u5408\u8def\u5f84\u4e86\uff0c\u5982<code>scheme:\/\/host path ? query # fragment<\/code>\u5c31\u4f1a\u6211\u4eec\u5e38\u89c1\u7684 url \u683c\u5f0f\uff1a<\/p>\n<pre><code>          userinfo       host      port           \u250c\u2500\u2500\u2534\u2500\u2500\u2500\u2510 \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2510 \u250c\u2534\u2510   https:\/\/[email&#160;protected]:123\/forum\/questions\/?tag=networking&amp;order=newest#top   \u2514\u2500\u252c\u2500\u2518   \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u252c\u2518   scheme          authority                  path                 query           fragment <\/code><\/pre>\n<h4>\u6839\u636e\u8f93\u5165\u7684 url \u5730\u5740\uff0c \u89e3\u6790\u51fa\u4e3b\u673a\u5730\u5740 <code>hostname<\/code>\u3002<\/h4>\n<p>\u6bd4\u5982\u8fd9\u4e2a url <code>https:\/\/stackoverflow.com\/questions\/tagged\/elixir<\/code>\uff0c<code>hostname<\/code>\u5c31\u662f <code>stackoverflow.com<\/code>\uff0c \u5176\u4ed6\u7684\u4e0d\u8fc7\u662f <code>URL<\/code> \u7684\u4e00\u90e8\u5206\u3002 \u7a0b\u5e8f\u4e2d\u7684<code>extract_hostname<\/code> \u51fd\u6570\u4fbf\u662f\u505a\u8fd9\u4e2a\u4e8b\u60c5\uff0c\u4e0b\u9762\u7684\u4ee3\u7801\u5904\u7406\u4e86\u5f88\u591a\u8fb9\u89d2\u60c5\u51b5\uff1a<\/p>\n<pre><code>int is_http_or_https_scheme(char *url, int url_len) {     if(url_len &gt;= 7 &amp;&amp; (strncmp(url, \"http:\/\/\", 7) == 0 || strncmp(url, \"https:\/\/\", 8) == 0)) {         return 1;     }else {         return 0;     } }  char* extract_hostname(char *url) {     int url_len = strlen(url);      if(is_http_or_https_scheme(url, url_len)) {         int i = 0;          while(url[i]!='\/' &amp;&amp; i!=url_len) {         \/\/skip scheme             i += 1;         }          int host_end = i+2;         while(url[host_end] != '\/') {             ++host_end;         }         int www_len = strncmp(url, \"www.\", 4) == 0?4:0;         int len = host_end - (i+2) - www_len;         char *ret = malloc(len);         strncpy(ret, url + i+2 + www_len, len);         printf(\"schema: http:\/\/abc.com\/abc n ret is %sn\",  ret);         return ret;     }else {         \/\/ abc.com\/abc         \/\/ www.abc.com\/abc         char *ret;         if(strncmp(url, \"www.\", 4) == 0) {             ret = malloc(url_len - 4);             strncpy(ret, url+4, url_len - 4);         }else{             ret = malloc(url_len - 1);             strncpy(ret, url, url_len);         }         printf(\"schema: abc.com\/abc n ret is %sn\",  ret);         return ret;     } } <\/code><\/pre>\n<h4>\u628a hostname \u89e3\u6790\u6210 ip \u5730\u5740<\/h4>\n<p>\u51fd\u6570 <code>getIPFromDNS<\/code> \u4fbf\u662f\u505a\u8fd9\u4e2a\u4e8b\u60c5\uff0c \u4e3b\u8981\u8c03\u7528 linux \u7684 gethostbyname \u5373\u53ef\u89e3\u6790<code>dns<\/code>\uff0c \u5f97\u5230\u4e00\u4e2a ip \u6570\u7ec4, \u901a\u5e38\u9009\u4e00\u4e2a\u5373\u53ef\u3002<\/p>\n<blockquote>\n<p>The gethostbyname() function returns a structure of type hostent for the given host name.<\/p>\n<\/blockquote>\n<pre><code>       The hostent structure is defined in &lt;netdb.h&gt; as follows:             struct hostent {                char  *h_name;            \/* official name of host *\/                char **h_aliases;         \/* alias list *\/                int    h_addrtype;        \/* host address type *\/                int    h_length;          \/* length of address *\/                char **h_addr_list;       \/* list of addresses *\/            }            #define h_addr h_addr_list[0] \/* for backward compatibility *\/ <\/code><\/pre>\n<p>\u6240\u4ee5<code>h_name<\/code>\u5c31\u662f\u6b63\u5f0f host \u540d\uff0c<code>h_addr_list<\/code>\u5c31\u662f\u89e3\u6790\u5230\u7684\u6b64 host \u7684 ip \u5730\u5740\u6570\u7ec4\u3002<\/p>\n<pre><code>char* getIPFromDNS(char *host) {     struct hostent *server = gethostbyname(host);     char *address = (char*)malloc(50);     if (server == NULL) {         fprintf(stderr,\"ERROR, no such hostn\");     }else {         printf(\"server 's hostname: %snn\", server-&gt;h_name);          struct in_addr **addr_list = (struct in_addr **) server-&gt;h_addr_list;         for(int i = 0; addr_list[i] != NULL; i++) {             strcpy(address, inet_ntoa(*addr_list[i]) );             printf(\" \u89e3\u6790\u5230\u7684 ip \u5730\u5740\u4e3a: IP ADDRESS-&gt;%sn\", address);         }     }     return address; } <\/code><\/pre>\n<h4>\u914d\u7f6e socket \u7684\u4fe1\u606f<\/h4>\n<p>\u51fd\u6570<code>init_serv_addr<\/code>\u914d\u7f6e <code>socket<\/code> \u7684\u4fe1\u606f\uff0c \u5982\u4f7f\u7528 <code>ipv4<\/code>, \u7528 80 \u7aef\u53e3\uff0c \u8bbf\u95ee\u54ea\u4e2a <code>ip<\/code>\uff0c\u7aef\u53e3\u662f\u591a\u5c11\u7b49\uff1a<\/p>\n<pre><code>struct sockaddr_in init_serv_addr(char *address, int port) {     struct sockaddr_in serv_addr;     memset(&amp;serv_addr, 0, sizeof(serv_addr));     serv_addr.sin_family = AF_INET;     serv_addr.sin_addr.s_addr = inet_addr(address);     serv_addr.sin_port = htons(port);     return serv_addr; }     struct sockaddr_in serv_addr = init_serv_addr(address, 80);      int sock = socket(AF_INET, SOCK_STREAM, 0);     if (connect(sock, (struct sockaddr*)&amp;serv_addr, sizeof(serv_addr)) &lt; 0) {         printf(\"connect err\");         return 0;     }  <\/code><\/pre>\n<h4>\u751f\u6210 http request \u5934\u90e8<\/h4>\n<p>\u8fde\u63a5 <code>socket<\/code>\u540e\uff0c <code>generate_request<\/code> \u751f\u6210 <code>http request<\/code> \uff0c \u6ce8\u610f\u7b2c\u4e00\u884c\u5373\u63cf\u8ff0\u4e86\u4f7f\u7528 <code>GET<\/code> \u534f\u8bae, <code>HTTP 1.1<\/code> \u7248\u672c\uff0c <code>HOST<\/code> \u5934\u90e8\u662f\u5fc5\u987b\u7684\uff0c \u56e0\u4e3a\u5927\u591a\u6570 web \u670d\u52a1\u5668\u90fd\u8bbe\u7f6e\u4e86\u865a\u62df\u4e3b\u673a\uff0c \u4e5f\u5c31\u662f\u6839\u636e <code>HOST<\/code> \u6765 redirect \u4f60\u5230\u4e0d\u540c\u7684 \u5730\u65b9\uff0c\u6240\u4ee5\u4f60 <code>http header<\/code> \u91cc\u4e0d\u5199 host\uff0c\u4ec5\u4ec5\u4f7f\u7528 ip \u662f\u4e0d\u884c\u7684\uff0c\u6bd4\u5982\u767e\u5ea6\u7b49\u3002<\/p>\n<pre><code>void generate_request(char *hostname, char *url, char *request_body) {     \/\/ \u6ce8\u610f\u8fd9\u91cc\u6709\u5751, http \u534f\u8bae\u89c4\u5b9a header \u53c2\u6570\u4e0d\u80fd\u6709\u7a7a\u683c, \u6240\u4ee5\u4e0b\u9762\u5fc5\u987b\u6ca1\u6709\u7a7a\u683c     \/\/  \u53e6\u5916, HOST \u8fd9\u4e2a\u5934\u90e8\u53c2\u6570\u4e3a\u4e86\u5e94\u5bf9 server_name,\u4e5f\u662f\u5fc5\u987b\u7684      sprintf(request_body, \" GET \/ HTTP\/1.1rn HOST: %srn User-Agent: Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/66.0.3359.181 Safari\/537.36rn Cache-Control: no-cachernrn\", hostname);     \/\/ \u53e6\u4e00\u79cd\u529e\u6cd5, \u4f46\u8c03\u7528\u51fd\u6570\u592a\u591a\u6b21\u4e86, \u6548\u7387\u76f8\u5bf9\u4e0d\u9ad8     \/* strcat(request_body, \"GET \"); *\/  \/* strcat(request_body, \"\/\"); *\/  \/* strcat(request_body, \" HTTP\/1.1rn\"); *\/  \/* strcat(request_body, \"HOST: \"); *\/  \/* strcat(request_body, hostname); *\/  \/* strcat(request_body, \"rn\"); *\/  \/* strcat(request_body,\"Cache-Control: no-cachernrn\"); *\/  printf(\"-&gt; HTTP \u8bf7\u6c42\u62a5\u6587\u5982\u4e0bn--------HTTP Request--------n%s--------n\", request_body); } <\/code><\/pre>\n<h4>\u5199 socket\uff0c\u53d1\u9001 request<\/h4>\n<p><code>total<\/code>\u5927\u5c0f\u7684 <code>body<\/code> \u5728\u53d1\u5b8c\u4e4b\u524d\u4e00\u76f4\u5199 <code>socket<\/code>\uff0c\u6ca1\u6709\u5199\u8fc7 linux \u7f51\u7edc\u7a0b\u5e8f\u7684\u4eba\u53ef\u4ee5\u7559\u610f\u4e00\u4e0b\uff0c\u5199\u4e86\u591a\u5c11\u662f\u7531 socket \u81ea\u8eab\u51b3\u5b9a\u7684\uff0c\u7a0b\u5e8f\u63a7\u5236\u4e0d\u4e86\uff0c\u6240\u4ee5\u8981 write \u540e\u624d\u5f97\u77e5\u5199\u4e86\u591a\u5c11\uff0c\u7136\u540e\u8c03\u6574\u4e0b\u6b21\u53d1\u9001\u7684\u5185\u5bb9\u3002<\/p>\n<pre><code>    \/* send the request *\/     int total = strlen(request_body);     int sent = 0;     do {         printf(\"total is %d n\", total);         int bytes = write(sock, request_body + sent, total - sent);         if (bytes &lt; 0)             printf(\"ERROR writing message to socket\");         if (bytes == 0)             break;         printf(\"wrote bytes %d n\", bytes);         sent += bytes;     } while (sent &lt; total); <\/code><\/pre>\n<h4>\u5904\u7406\u5bf9\u65b9\u7684\u8fd4\u56de<\/h4>\n<p>\u6536\u5230 <code>response<\/code> \u7684\u5934\u90e8\u540e(\u6839\u636e<code>rnrn<\/code> \u5212\u5206), \u89e3\u6790\u51fa <code>Content-Length<\/code>\uff0c \u63a5\u7740\u6536\u5269\u4e0b\u7684\u5185\u5bb9\uff1a<\/p>\n<pre><code>    char resp[10*1024];     memset(resp, 0, sizeof(resp));     total = sizeof(resp)-1;     int received = 0;     int content_len = 0;     int body_size = 0;     do {         content_len = 0;         printf(\"---------------n\");         printf(\"start received: %d, total: %d, total - received= %d n\", received, total,                 total-received);         int bytes = recv(sock,  resp+received, total-received, 0);         printf(\"received bytes %d n\", bytes);         if (bytes &lt; 0) {             printf(\"ERROR reading resp from socket\");         }         if (bytes == 0) {             printf(\"received bytes 0, breakn\");             break;         }         received += bytes;         \/* printf(\"n------- resp ------- n%sn\", resp); *\/         printf(\"-------- sizeof(resp) %lun\", sizeof(resp));         int header_size = 0;         for(; header_size&lt;sizeof(resp) &amp;&amp;                 (strncmp(resp+header_size, \"rnrn\", strlen(\"rnrn\")) != 0); ++header_size) {             if(strncmp(resp+header_size, \"Content-Length:\", strlen(\"Content-Length:\")) == 0) {                 int tmp = header_size + strlen(\"Content-Length:\") + 1;                 while(resp[tmp] != 'r') {                     content_len = content_len*10 + (resp[tmp] - '0');                     tmp++;                 }             }             printf(\"%c\", resp[header_size]);         }         printf(\"ncontent_len %dn\", content_len);         \/* printf(\"nn&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;n\"); *\/         \/* for(int i=header_size; i!=total; ++i) { *\/         \/*     printf(\"%c\", resp[i]); *\/         \/* } *\/         header_size += strlen(\"rnrn\");         body_size = content_len + header_size;         printf(\"header size %dn\", header_size);         printf(\"nbody_size %dn\", body_size);         printf(\"end received: %d, total: %d, total - received= %d n\", received, total,                 total-received);     } while(received != body_size &amp;&amp; received &lt; total);  <\/code><\/pre>\n<p>\u81f3\u6b64, \u4e00\u4e2a\u7b80\u5355\u7684 http client \u5b8c\u6210.<\/p>\n<h5>\u793a\u4f8b<\/h5>\n<p>http:\/\/example.com \u89e3\u6790\u5230\u7684 ip \u5730\u5740\u4e3a: <code>IP ADDRESS-&gt;93.184.216.34<\/code><\/p>\n<p>HTTP \u8bf7\u6c42\u62a5\u6587\u5982\u4e0b<\/p>\n<pre><code>--------HTTP Request-------- GET \/ HTTP\/1.1 HOST: example.com User-Agent: Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/66.0.3359.181 Safari\/537.36 Cache-Control: no-cache <\/code><\/pre>\n<p>\u670d\u52a1\u5668 response \u56de\u590d\u7684\u5934\u90e8\u4e3a\uff1a<\/p>\n<pre><code>HTTP\/1.1 200 OK Cache-Control: max-age=604800 Content-Type: text\/html Date: Thu, 21 Jun 2018 10:35:29 GMT Etag: \"1541025663+ident\" Expires: Thu, 28 Jun 2018 10:35:29 GMT Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT Server: ECS (oxr\/8313) Vary: Accept-Encoding X-Cache: HIT Content-Length: 1270 <\/code><\/pre>\n<p>\u63a5\u7740\u7684\u5185\u5bb9\u662f\uff1a<\/p>\n<pre><code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt;     &lt;title&gt;Example Domain&lt;\/title&gt;      &lt;meta charset=\"utf-8\" \/&gt;     &lt;meta http-equiv=\"Content-type\" content=\"text\/html; charset=utf-8\" \/&gt;     &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" \/&gt;     &lt;style type=\"text\/css\"&gt;     body {         background-color: #f0f0f2;         margin: 0;         padding: 0;         font-family: \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;      }     div {         width: 600px;         margin: 5em auto;         padding: 50px;         background-color: #fff;         border-radius: 1em;     }     a:link, a:visited {         color: #38488f;         text-decoration: none;     }     @media (max-width: 700px) {         body {             background-color: #fff;         }         div {             width: auto;             margin: 0 auto;             border-radius: 0;             padding: 1em;         }     }     &lt;\/style&gt; &lt;\/head&gt;  &lt;body&gt; &lt;div&gt;     &lt;h1&gt;Example Domain&lt;\/h1&gt;     &lt;p&gt;This domain is established to be used for illustrative examples in documents. You may use this     domain in examples without prior coordination or asking for permission.&lt;\/p&gt;     &lt;p&gt;&lt;a href=\"http:\/\/www.iana.org\/domains\/example\"&gt;More information...&lt;\/a&gt;&lt;\/p&gt; &lt;\/div&gt; &lt;\/body&gt; &lt;\/html&gt; <\/code><\/pre>\n<p>\u4ee5\u4e0a\u662f\u7f51\u9875\u5185\u5bb9\u4e86\u3002<\/p>\n<h4>TODO<\/h4>\n<p>\u63a5\u4e0b\u6765\u53ef\u4ee5\u505a\u7684\u6709:<\/p>\n<ol>\n<li>\u652f\u6301 cookies \u4e0e session<\/li>\n<li>\u652f\u6301 http 302 \u91cd\u5b9a\u5411\u5230 https<\/li>\n<li>\u652f\u6301 https \u8bbf\u95ee<\/li>\n<li>\u5b8c\u6210\u6d4f\u89c8\u5668\u57fa\u672c\u529f\u80fd, \u628a css \u4e0e\u56fe\u7247\u7b49\u90fd\u8bf7\u6c42\u8fc7\u6765<\/li>\n<\/ol>\n<h1>\u770b\u5230\u6700\u540e\u7684\u4f60<\/h1>\n<p> <\/p>\n<p>\u672c\u6587\u53ea\u662f\u629b\u7816\u5f15\u7389\uff1b P<\/p>\n<p>\u5728\u4e0b\u5728 Shopee \u5de5\u4f5c\uff0c\u89c9\u5f97\u6c34\u6df1\u706b\u70ed\u4e0d\u559c\u6b22\u52a0\u73ed\u7684\u540c\u5b66\u53ef\u4ee5\u8003\u8651\u4e00\u4e0b<\/p>\n<p>\u62d2\u7edd 996\uff0c\u90a3\u5c31\u6765 shopee\uff0c\u5f85\u9047 work life balance \u4e24\u4e0d\uff1a https:\/\/www.v2ex.com\/t\/672561#reply1<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>7<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1738551\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sadfQED2 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \uff1f\uff1f\uff1f\u8fd8\u6709\u8fd9\u6837\u62db\u4eba\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1738552\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Lax <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u52a0\u73ed\u9020\u9489\u5b50\uff1f\uff1f\uff1f<\/p>\n<p>\u4e3a\u5565\u8981\u5355\u72ec\u5904\u7406\u4e00\u4e0b `www.`                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1738553\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : ChristopherWu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @sadfQED2                                                             <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1738554\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : ChristopherWu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Lax \u4e24\u5e74\u524d\u7684\u4e2a\u4eba\u9879\u76ee\uff0c\u5b66\u4e60 http \u534f\u8bae\u5199\u7684\u3002\u5355\u72ec\u5904\u7406 www \u662f\u60f3\u628a hostname \u62ff\u51fa\u6765                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1738555\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Alex5467 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u54c8\u54c8\u54c8\uff0c\u4ed6\u4e4b\u524d\u8fd8\u53d1\u8fc7\u4e00\u4e2a\uff0c\u6211\u770b\u5230\u6700\u540e\u4e5f\u662f\u53d1\u73b0\u5728\u62db\u4eba                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1738556\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Alex5467 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/www.v2ex.com\/t\/674356#reply3<br \/>\u5c31\u662f\u8fd9\u4e2a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1738557\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : ChristopherWu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Alex5467 \u65b0\u5957\u8def                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u6b65\u6b65\u624b\u5199 http \u5e95\u5c42\u5ba2\u6237\u7aef &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/105422"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=105422"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/105422\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=105422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=105422"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=105422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}