-
Notifications
You must be signed in to change notification settings - Fork 166
Rename after redirection #2570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename after redirection #2570
Conversation
c09ee62 to
27f4cb5
Compare
dynamic-entropy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really mean "anything" here or do we only need authz cgi parameter.
xrootd/src/XrdHttp/XrdHttpReq.cc
Lines 981 to 985 in 8ac19b1
| // We assume that anything appended to the CGI str should also | |
| // apply to the destination in case of a MOVE. | |
| if (strchr(destination.c_str(), '?')) destination.append("&"); | |
| else destination.append("?"); | |
| destination.append(hdr2cgistrEncoded.c_str()); |
27f4cb5 to
ddd0688
Compare
dynamic-entropy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ddd0688 to
0427103
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it actually OK that this goes to XrdHttpUtils so that unit tests are created with different cases? Including tests like authauthauthz= for example
68db077 to
7a98d1d
Compare
7a98d1d to
602c395
Compare
ccaffy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good, think about squashing your commits please before merging :)
602c395 to
74db9e9
Compare
|
Thankyou! I have squashed the unit test and related changes in a single commit. The rest of the commits include conceptually separate changes, and I would like to keep them as is. |
74db9e9 to
a91e055
Compare
|
Also rebased on master. |
Yes, feel free to open a new issue if that is not been done already ;) |
a91e055 to
c6c2ed3
Compare
|
Reworded commits and opened the issue from Brian's comments: #2572 |
|
I discussed this with @abh3 yesterday. The conclusion is that the simplest fix should be applied here, i.e., just move the lines added by commit 6e01c0d to where moves are processed (shown below): xrootd/src/XrdHttp/XrdHttpReq.cc Lines 1723 to 1754 in d9af49d
Since we plan to support |
c6c2ed3 to
bd575c1
Compare
bd575c1 to
58821f6
Compare
58821f6 to
b5ca86f
Compare
b5ca86f to
3f71357
Compare
|
I think we agreed to have the tests added in a separate pull request (i.e. #2575), so could you please leave here just the two commits with fixes? Thank you. |
|
We did revise that and agreed that it is good for the tests to go in with this PR and if we ever revist them they can buid / modify them. On a different note: Actually I find this better than the XRootD tests as they leave no files but only |
3f71357 to
9d5ff87
Compare
Move operations from a manager should succed after redirection
- Add tests for rename operation with HTTP
- MOVE operation is currently fails
after redirection
- Thus the tests assert against http code 401;
a fix would change it to 201 instead
- For redirection from meta-manager; move failes
for a manager node
…peration; this allows rename after redirections
9d5ff87 to
dde60fb
Compare
Fix #2550
In 8ce935f, the desired goal is to add the CGI parameter
authzto the "Destination" of theMOVEoperation before it is evaluated for access permissions.After a redirection. the authorization header takes the form of a CGI parameter and is no longer present in the redirected request.
Optionally, one can instruct curl to send the authorization header on redirect with --location-trusted; however, this is not the default behaviour.
Note that the way things are implemented currently, the use of
--location-trustedwill not work either after redirection, (as tested here #2550 (comment) since the presence ofauthzin the resource url will prevent its copying into theheader2cgistring.xrootd/src/XrdHttp/XrdHttpReq.cc
Lines 211 to 218 in 8ac19b1