[GH-ISSUE #383] s3fs must send User-Agent #200

Closed
opened 2026-03-04 01:43:11 +03:00 by kerem · 6 comments
Owner

Originally created by @michaelyasko on GitHub (Mar 30, 2016).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/383

it need something like this:

--- /usr/local/src/s3fs-fuse/src/curl.cpp 2016-03-30 11:05:32.745505432 +0000
+++ ./curl.cpp 2016-03-30 10:18:45.000000000 +0000
@@ -50,6 +50,8 @@
#include "s3fs_auth.h"
#include "addhead.h"

+#define S3FS_USERAGENT "s3fs"
+
using namespace std;

static const std::string empty_payload_hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
@@ -1597,12 +1599,14 @@
switch(type){
case REQTYPE_DELETE:
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_CUSTOMREQUEST, "DELETE");
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    break;

    case REQTYPE_HEAD:
    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_NOBODY, true);
    curl_easy_setopt(hCurl, CURLOPT_FILETIME, true);
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    @@ -1613,6 +1617,7 @@

    case REQTYPE_PUTHEAD:
    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true);
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    @@ -1622,6 +1627,7 @@

    case REQTYPE_PUT:
    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true);
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    @@ -1636,6 +1642,7 @@

    case REQTYPE_GET:
    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, S3fsCurl::DownloadWriteCallback);
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)this);
    @@ -1643,6 +1650,7 @@

    case REQTYPE_CHKBUCKET:
    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    @@ -1650,6 +1658,7 @@

    case REQTYPE_LISTBUCKET:
    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    @@ -1657,6 +1666,7 @@

    case REQTYPE_PREMULTIPOST:
    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_POST, true);
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    @@ -1666,6 +1676,7 @@

    case REQTYPE_COMPLETEMULTIPOST:
    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    curl_easy_setopt(hCurl, CURLOPT_POST, true);
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    @@ -1677,6 +1688,7 @@

    case REQTYPE_UPLOADMULTIPOST:
    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true);
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    @@ -1690,6 +1702,7 @@

    case REQTYPE_COPYMULTIPOST:
    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true);
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    @@ -1701,6 +1714,7 @@

    case REQTYPE_MULTILIST:
    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    @@ -1708,12 +1722,14 @@

    case REQTYPE_IAMCRED:
    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    break;

    case REQTYPE_ABORTMULTIUPLOAD:
    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  •  curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    

    curl_easy_setopt(hCurl, CURLOPT_CUSTOMREQUEST, "DELETE");
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    break;
    @@ -2131,6 +2147,7 @@
    }

    curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_CUSTOMREQUEST, "DELETE");
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);

@@ -2165,6 +2182,7 @@
bodydata = new BodyData();

curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);

@@ -2268,6 +2286,7 @@
}

curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_NOBODY, true); // HEAD
    curl_easy_setopt(hCurl, CURLOPT_FILETIME, true); // Last-Modified
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    @@ -2416,6 +2435,7 @@

// setopt
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true); // HTTP PUT
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    @@ -2534,6 +2554,7 @@

// setopt
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true); // HTTP PUT
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    @@ -2606,6 +2627,7 @@

// setopt
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, S3fsCurl::DownloadWriteCallback);
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)this);
    @@ -2686,6 +2708,7 @@

// setopt
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    @@ -2739,6 +2762,7 @@

// setopt
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    @@ -2851,6 +2875,7 @@

// setopt
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_POST, true); // POST
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    @@ -2961,6 +2986,7 @@

// setopt
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    curl_easy_setopt(hCurl, CURLOPT_POST, true); // POST
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    @@ -3015,6 +3041,7 @@

// setopt
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);
    @@ -3068,6 +3095,7 @@
    }

curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_CUSTOMREQUEST, "DELETE");
    curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders);

@@ -3155,6 +3183,7 @@

// setopt
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true); // HTTP PUT
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
    @@ -3255,6 +3284,7 @@

// setopt
curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str());

  • curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT);
    curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true); // HTTP PUT
    curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata);
    curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
Originally created by @michaelyasko on GitHub (Mar 30, 2016). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/383 it need something like this: --- /usr/local/src/s3fs-fuse/src/curl.cpp 2016-03-30 11:05:32.745505432 +0000 +++ ./curl.cpp 2016-03-30 10:18:45.000000000 +0000 @@ -50,6 +50,8 @@ #include "s3fs_auth.h" #include "addhead.h" +#define S3FS_USERAGENT "s3fs" + using namespace std; static const std::string empty_payload_hash = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; @@ -1597,12 +1599,14 @@ switch(type){ case REQTYPE_DELETE: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); break; case REQTYPE_HEAD: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_NOBODY, true); curl_easy_setopt(hCurl, CURLOPT_FILETIME, true); curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); @@ -1613,6 +1617,7 @@ case REQTYPE_PUTHEAD: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true); curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); @@ -1622,6 +1627,7 @@ case REQTYPE_PUT: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true); curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); @@ -1636,6 +1642,7 @@ case REQTYPE_GET: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, S3fsCurl::DownloadWriteCallback); curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)this); @@ -1643,6 +1650,7 @@ case REQTYPE_CHKBUCKET: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); @@ -1650,6 +1658,7 @@ case REQTYPE_LISTBUCKET: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); @@ -1657,6 +1666,7 @@ case REQTYPE_PREMULTIPOST: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_POST, true); curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); @@ -1666,6 +1676,7 @@ case REQTYPE_COMPLETEMULTIPOST: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); curl_easy_setopt(hCurl, CURLOPT_POST, true); curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); @@ -1677,6 +1688,7 @@ case REQTYPE_UPLOADMULTIPOST: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true); curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); @@ -1690,6 +1702,7 @@ case REQTYPE_COPYMULTIPOST: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true); curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); @@ -1701,6 +1714,7 @@ case REQTYPE_MULTILIST: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); @@ -1708,12 +1722,14 @@ case REQTYPE_IAMCRED: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); break; case REQTYPE_ABORTMULTIUPLOAD: curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - ``` curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); ``` curl_easy_setopt(hCurl, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); break; @@ -2131,6 +2147,7 @@ } curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); @@ -2165,6 +2182,7 @@ bodydata = new BodyData(); curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); @@ -2268,6 +2286,7 @@ } curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_NOBODY, true); // HEAD curl_easy_setopt(hCurl, CURLOPT_FILETIME, true); // Last-Modified curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); @@ -2416,6 +2435,7 @@ // setopt curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true); // HTTP PUT curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); @@ -2534,6 +2554,7 @@ // setopt curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true); // HTTP PUT curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); @@ -2606,6 +2627,7 @@ // setopt curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, S3fsCurl::DownloadWriteCallback); curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)this); @@ -2686,6 +2708,7 @@ // setopt curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); @@ -2739,6 +2762,7 @@ // setopt curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); @@ -2851,6 +2875,7 @@ // setopt curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_POST, true); // POST curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); @@ -2961,6 +2986,7 @@ // setopt curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); curl_easy_setopt(hCurl, CURLOPT_POST, true); // POST curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); @@ -3015,6 +3041,7 @@ // setopt curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); @@ -3068,6 +3095,7 @@ } curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_easy_setopt(hCurl, CURLOPT_HTTPHEADER, requestHeaders); @@ -3155,6 +3183,7 @@ // setopt curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true); // HTTP PUT curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback); @@ -3255,6 +3284,7 @@ // setopt curl_easy_setopt(hCurl, CURLOPT_URL, url.c_str()); - curl_easy_setopt(hCurl, CURLOPT_USERAGENT, S3FS_USERAGENT); curl_easy_setopt(hCurl, CURLOPT_UPLOAD, true); // HTTP PUT curl_easy_setopt(hCurl, CURLOPT_WRITEDATA, (void*)bodydata); curl_easy_setopt(hCurl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
kerem closed this issue 2026-03-04 01:43:12 +03:00
Author
Owner

@ggtakec commented on GitHub (Apr 10, 2016):

@michaelyasko I'm sorry for replying late.

Do you are you need a User-Agent for the IAM role?(or what other reasons?)
And is User-Agent may be an optional?

I know only s3curl which sends User-Agent, but I think other tools do not send it.
Although it is possible to add the User-Agent, but for me it is not the correct clear whether as a Web API.

I want to know the opinions of other s3fs users.
If this feature is not essential, it will be implemented as an option.

Please comment on obligations of the User-Agent.

Thanks in advance for your assistance.

<!-- gh-comment-id:207917729 --> @ggtakec commented on GitHub (Apr 10, 2016): @michaelyasko I'm sorry for replying late. Do you are you need a User-Agent for the IAM role?(or what other reasons?) And is User-Agent may be an optional? I know only s3curl which sends User-Agent, but I think other tools do not send it. Although it is possible to add the User-Agent, but for me it is not the correct clear whether as a Web API. I want to know the opinions of other s3fs users. If this feature is not essential, it will be implemented as an option. Please comment on obligations of the User-Agent. Thanks in advance for your assistance.
Author
Owner

@michaelyasko commented on GitHub (Apr 14, 2016):

Sorry for late answer.
Our company use swift by OpenStack.
Authorization algorythm of connect to swift needs User-Agent.
I think User-Agent may be an optional, but if it always is present - it's not bad to.

<!-- gh-comment-id:209802440 --> @michaelyasko commented on GitHub (Apr 14, 2016): Sorry for late answer. Our company use swift by OpenStack. Authorization algorythm of connect to swift needs User-Agent. I think User-Agent may be an optional, but if it always is present - it's not bad to.
Author
Owner

@gaul commented on GitHub (Apr 14, 2016):

@ggtakec Sending an s3fs user agent with version might also help with debugging in various situations.

<!-- gh-comment-id:210123591 --> @gaul commented on GitHub (Apr 14, 2016): @ggtakec Sending an s3fs user agent with version might also help with debugging in various situations.
Author
Owner

@ggtakec commented on GitHub (Apr 15, 2016):

@michaelyasko @andrewgaul
Since I understand your opinion, and I think so.
Thus I try to be the implementation on the weekend, and I will consider whether to optional.
Please wait a while.

Regards,

<!-- gh-comment-id:210292279 --> @ggtakec commented on GitHub (Apr 15, 2016): @michaelyasko @andrewgaul Since I understand your opinion, and I think so. Thus I try to be the implementation on the weekend, and I will consider whether to optional. Please wait a while. Regards,
Author
Owner

@ggtakec commented on GitHub (Apr 17, 2016):

@michaelyasko #397 is merged.
After this, s3fs always puts User-Agent as "s3fs/version (commit hash ; )".
If you do not need to put User-Agent, you can set "noua" option for s3fs.

Please try to use this.
Thanks in advance for your assistance.

<!-- gh-comment-id:210972292 --> @ggtakec commented on GitHub (Apr 17, 2016): @michaelyasko #397 is merged. After this, s3fs always puts User-Agent as "s3fs/version (commit hash <hashvalue>; <ssl lib name>)". If you do not need to put User-Agent, you can set "noua" option for s3fs. Please try to use this. Thanks in advance for your assistance.
Author
Owner

@ggtakec commented on GitHub (May 29, 2016):

I'm closing this issue because new release 1.80 puts user agent.
If you found bugs, please post new issue.
Regards,

<!-- gh-comment-id:222343775 --> @ggtakec commented on GitHub (May 29, 2016): I'm closing this issue because new release 1.80 puts user agent. If you found bugs, please post new issue. Regards,
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#200
No description provided.