ithewei 6 سال پیش
والد
کامیت
a03816af17
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      http/client/http_client.cpp
  2. 1 1
      http/client/http_client.h

+ 1 - 1
http/client/http_client.cpp

@@ -83,7 +83,7 @@ int http_client_send(HttpRequest* req, HttpResponse* res, int timeout) {
     // url
     std::string url = req->dump_url();
     curl_easy_setopt(handle, CURLOPT_URL, url.c_str());
-    //hlogd("%s %s HTTP/%d.%d", http_method_str(req->method), url.c_str(), http_major, http_minor);
+    //hlogd("%s %s HTTP/%d.%d", http_method_str(req->method), url.c_str(), req->http_major, req->http_minor);
 
     // header
     req->fill_content_type();

+ 1 - 1
http/client/http_client.h

@@ -11,7 +11,7 @@
 int main(int argc, char* argv[]) {
     HttpRequest req;
     req.method = HTTP_GET;
-    req.url = "www.baidu.com";
+    req.url = "http://ftp.sjtu.edu.cn/sites/ftp.kernel.org/pub/linux/kernel/";
     HttpResponse res;
     int ret = http_client_send(&req, &res);
     printf("%s\n", req.dump(true,true).c_str());