-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fix bug where project name not set in user-agent #977
Fix bug where project name not set in user-agent #977
Conversation
Running the code locally, I still get
|
Are there multiple of those appinfo fields returned? When I run it I get quite a few returned to me with some being what is expected. I can play around with this more tho if that is not the case |
There are, but the only one that seems to relate to the file transfer is the |
Yeah, I don't think it will show up unless the project name is set correctly. You can set an env variable called |
5630d54
to
cb348fc
Compare
@haoming29 Give this a go now. I was seeing grab too locally but with this one line change it seems to be giving me the correct User-Agent now. |
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.
The revised version gave me pelican-client/7.6.1-next project/some project name
as the user agent header read by the xrootd, which should be what we expect. Give the green light here. For the comment on the localcache, feel free address it or not.
Thanks for fixing this!
I found that the catch here is that I only get a non-empty project name if the |
Project name, if set, will now show up in the user-agent header for requests. This PR also removes some old unused legacy code of the "payload" object (the only piece of the object still used was the project name). Also includes a unit test checking that the client properly sets this header.
b88d328
to
ee5dff9
Compare
Alright, made those suggestions as well as allowed the ProjectName to be surrounded by "" or not and still work. Just going to let the tests run just in case before I merge. |
Project name, if set, will now show up in the user-agent header for requests. This PR also removes some old unused legacy code of the "payload" object (the only piece of the object still used was the project name). Also includes a unit test checking that the client properly sets this header.