Comments (5)
from xrootd4j.
Yes, that's why I created this issue, we need to go through all operations and identify which ones have a path and make sure we strip off any query-part.
I think we should also take this advantage of this opportunity to add unit tests for this. See StatRequestTest
for one possible way of achieving this.
from xrootd4j.
Let me clarify something here.
First, there are already a set of requests:
DirListRequest
LocateRequest
MkDirRequest
OpenRequest
RmDirRequest
RmRequest
StatRequest
which sublcass PathRequest. When the message buffer is parsed in their constructors, it is already split on a the potential opaque delimiter ('?').
So we are already supporting queries on those requests.
The case of mv seems to be special, because two paths are involved.
The code for the the MvRequest thus is a one-off.
The issue seems to be in the assumption that only the target path can have the opaque (query) string (that is, it will follow the target path, not the source).
public MvRequest(ByteBuf buffer) {
super(buffer, kXR_mv);
int dlen = buffer.getInt(20);
int end = 24 + dlen;
int psep = buffer.indexOf(24, end, (byte)0x20);
int osep = buffer.indexOf(psep, end, (byte)0x3f);
if (psep == -1) {
throw new IllegalArgumentException("kXR_mv needs two paths!");
}
if (osep > -1) {
sourcePath = buffer.toString(24,
psep - 24,
US_ASCII);
targetPath = buffer.toString(psep+1,
osep - (psep + 1),
US_ASCII);
opaque = buffer.toString(osep + 1,
end - (osep + 1),
US_ASCII);
} else {
sourcePath = buffer.toString(24,
psep - 24,
US_ASCII);
targetPath = buffer.toString(psep+1,
end - (psep + 1),
US_ASCII);
opaque = null;
}
}
I don't believe we need, therefore, to fix a general problem, just this class.
from xrootd4j.
https://rb.dcache.org/r/11422/
needs more testing
I am not sure that xrdfs actually is sending the query part
from xrootd4j.
Testing complete, patch committed to master, with pull request for 3.3
from xrootd4j.
Related Issues (15)
- handling stat request HOT 24
- TLS with readv HOT 8
- malicious client can crash a pool on write HOT 4
- optimization of buffer usage on pools HOT 1
- Implement kXR_fattr and extended info for xKR_stat HOT 8
- issue with dCache 2.10.8 HOT 8
- XrootD client implementation HOT 11
- more fun with AES cipher pad block errors, XrootD 4.9 HOT 6
- Stack-traced logged by mistake HOT 8
- Support TPC for ALICE tokens HOT 2
- Support kXR_query kXR_Qprep
- Support TLS HOT 1
- Error during decrypting/server-side key exchange: pad block corrupted HOT 35
- possible race in get checksum HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xrootd4j.