Skip to content

Commit 02d6a53

Browse files
bbockelmmatyasselmeci
authored andcommitted
[#34] Add S3 as a permitted proxy protocol
1 parent d719285 commit 02d6a53

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

src/XrdApps/XrdCpConfig.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ do{while(optind < Argc && Legacy(optind)) {}
386386
&& dstFile->Protocol != XrdCpFile::isStdIO
387387
&& dstFile->Protocol != XrdCpFile::isXroot
388388
&& dstFile->Protocol != XrdCpFile::isPelican
389+
&& dstFile->Protocol != XrdCpFile::isS3
389390
&& (!Want(DoAllowHttp) && ((dstFile->Protocol == XrdCpFile::isHttp) ||
390391
(dstFile->Protocol == XrdCpFile::isHttps))))
391392
{FMSG(dstFile->ProtName <<"file protocol is not supported.", 22)}
@@ -905,6 +906,7 @@ void XrdCpConfig::ProcFile(const char *fname)
905906
else if (!((pFile->Protocol == XrdCpFile::isXroot) ||
906907
(pFile->Protocol == XrdCpFile::isXroots) ||
907908
(pFile->Protocol == XrdCpFile::isPelican) ||
909+
(pFile->Protocol == XrdCpFile::isS3) ||
908910
(Want(DoAllowHttp) && ((pFile->Protocol == XrdCpFile::isHttp) ||
909911
(pFile->Protocol == XrdCpFile::isHttps)))))
910912
{FMSG(pFile->ProtName <<" file protocol is not supported.", 22)}

src/XrdApps/XrdCpFile.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ XrdCpFile::XrdCpFile(const char *FSpec, int &badURL)
5656
{"root://", 7, isXroot},
5757
{"roots://", 8, isXroots},
5858
{"http://", 7, isHttp},
59-
{"pelican://", 10, isPelican},
59+
{"pelican://", 10, isPelican},
60+
{"s3://", 5, isS3},
6061
{"https://", 8, isHttps}
6162
};
6263
static int pTnum = sizeof(pTab)/sizeof(struct proto);

src/XrdApps/XrdCpFile.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class XrdCpFile
3838
public:
3939

4040
enum PType {isOther = 0, isDir, isFile, isStdIO,
41-
isXroot, isXroots, isHttp, isHttps, isPelican, isDevNull, isDevZero
41+
isXroot, isXroots, isHttp, isHttps, isPelican, isS3, isDevNull, isDevZero
4242
};
4343

4444
XrdCpFile *Next; // -> Next file in list

src/XrdPss/XrdPssUtils.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace
4343
{{ "https://", 8}, { "http://", 7},
4444
{ "roots://", 8}, { "root://", 7},
4545
{"xroots://", 9}, {"xroot://", 8},
46-
{"pelican://", 10}
46+
{"pelican://", 10}, {"s3://", 5}
4747
};
4848
int pTNum = sizeof(pTab)/sizeof(pEnt);
4949
int xrBeg = 2;

0 commit comments

Comments
 (0)