-
Notifications
You must be signed in to change notification settings - Fork 166
[XrdHttp] Allow static headers to be specified for browsers #2389
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
Conversation
|
@amadio - do you recognize the test failures? I'd be a bit surprised if it was due to the PR itself (as the tests appear to be over the xrootd protocol and the changes here are localized to HTTP). |
|
@bbockelm Yes, those are from Andy's last couple of commits. I think it's actually better to send pull requests for master, since I can merge either there or retarget to devel more easily than the other way around. And you will not see these test failures. |
|
No doubt, but other than the test ending with a non-zero RC there are no other error messages. Another transient error? |
c6bccb7 to
e11031a
Compare
|
Ok, hearing no fundamental objections, I added an integration test and have marked this as ready for review. |
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.
Thanks again, I found some issues under certain circumstances (see different comments)
8b4490e to
5f73727
Compare
|
@ccaffy - I touched up the pieces requested and adjusted the integration test accordingly. Please re-review. |
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.
Just one typo and then it's ready to go. I tried it on my box and it works as expected! Thanks
5f73727 to
1ecc6f9
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.
Thanks Brian for the fixes!
I'll create an issue for @abh3 to update the xrd http documentation to document these flags behavior.
|
If this doesn't depend on anything from |
1ecc6f9 to
772b027
Compare
|
@amadio - sounds good! While there are some nearby code changes, nothing from |
|
Ok, I'm marking this for 5.8.0. If there are no problems with ABI (which I will test later), I will merge this after 5.7.3 is released. |
This adds some simple, statically-defined headers to the integration test to ensure they are appropriately included in the responses.
772b027 to
aaa558c
Compare
|
Rebased to resolve conflicts with other merged changes that touched |
(This patch is more of a RFI -- I think all the infrastructure is in place that I can add a unit test before marking it as not a draft)
In Pelican, we want to allow users from browsers to be able to access XRootD servers (including through redirections). However, to do this, we need to add a few extra headers to all
GETandOPTIONSrequests to permit redirections across sites (we hit various CORS safeguards that are reasonable for a generic webapp -- but needed for a data federation).The existing plugin mechanism isn't sufficient because we don't want to replace the XRootD handling of the requests (such as a
GET) but rather augment it with a few static headers.This PR adds a new configuration option,
http.staticheader, that permits such a header to be set. The config option has the following form:Here's a few examples:
-verbis omitted then the header is set for all requestsSo, for the example configuration above, here's the response for a simple
GETrequest: