{"action":"created","issue":{"url":"https://api.github.com/repos/xrootd/xrootd/issues/577","repository_url":"https://api.github.com/repos/xrootd/xrootd","labels_url":"https://api.github.com/repos/xrootd/xrootd/issues/577/labels{/name}","comments_url":"https://api.github.com/repos/xrootd/xrootd/issues/577/comments","events_url":"https://api.github.com/repos/xrootd/xrootd/issues/577/events","html_url":"https://github.com/xrootd/xrootd/issues/577","id":255088208,"number":577,"title":"davix-client fails to follow redirection => missing urlencoding in xrdhttp-redirection?","user":{"login":"olifre","id":166759,"avatar_url":"https://avatars0.githubusercontent.com/u/166759?v=4","gravatar_id":"","url":"https://api.github.com/users/olifre","html_url":"https://github.com/olifre","followers_url":"https://api.github.com/users/olifre/followers","following_url":"https://api.github.com/users/olifre/following{/other_user}","gists_url":"https://api.github.com/users/olifre/gists{/gist_id}","starred_url":"https://api.github.com/users/olifre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olifre/subscriptions","organizations_url":"https://api.github.com/users/olifre/orgs","repos_url":"https://api.github.com/users/olifre/repos","events_url":"https://api.github.com/users/olifre/events{/privacy}","received_events_url":"https://api.github.com/users/olifre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-04T16:51:35Z","updated_at":"2017-09-04T18:42:13Z","closed_at":null,"author_association":"NONE","body":"I am only 99% sure this is an xrootd issue, so I am first reporting this here... \r\n\r\nFollowing setup (all xrootd 4.7):\r\n- Manager `xrootd.somedomain` with ip address: `IPv4ADDRESSOFMGR`\r\n- Data server `xrootd001.somedomain` with ip address: `IPv4ADDRESSOFDS`\r\n- Some client to test, with ip address `IPv4ADDRESSOFCLIENT`\r\n\r\nBoth servers contain in their configuration (amongst some authentication stuff):\r\n```\r\nall.manager xrootd.somedomain:1213\r\nall.role server\r\nall.role manager if xrootd.somedomain\r\nhttp.selfhttps2http yes\r\ndesthttps no\r\nif exec xrootd\r\nxrd.protocol XrdHttp /usr/lib64/libXrdHttp.so\r\nfi\r\nhttp.secretkey REDACTED\r\n```\r\n\r\nNow I run:\r\n```\r\ndavix-ls --debug -P Grid https://xrootd.somedomain:1094/beegfs/grid/atlas/atlaslocalgroupdisk/\r\n```\r\nI get (abbreviated a bit):\r\n```\r\n> PROPFIND /beegfs/grid/atlas/atlaslocalgroupdisk/ HTTP/1.1\r\n> Host: xrootd.somedomain:1094\r\n[... Lots of SSL handling which goes well...]\r\n< HTTP/1.1 302 Redirect\r\n< Content-Length: 0\r\n< Location: http://[::ffff:IPv4ADDRESSOFMGR]:1094/beegfs/grid/atlas/atlaslocalgroupdisk/?xrdhttptk=s6Q7i5fjNHzy17b/z/2hXA==&xrdhttptime=1504543303&xrdhttpname=Oliver%20Freyermuth&xrdhttpvorg=atlas&xrdhttphost=%5B%3A%3Affff%3AIPv4ADDRESSOFCLIENT%5D&xrdhttpdn=REDACTED\r\n```\r\nSo far, so good, self-redirection to http with a temporary key. Please note that the redacted `xrdhttpdn` is nicely URL escaped. \r\n\r\nNow, I see:\r\n```\r\n> PROPFIND /beegfs/grid/atlas/atlaslocalgroupdisk/?xrdhttptk=s6Q7i5fjNHzy17b/z/2hXA==&xrdhttptime=1504543303&xrdhttpname=Oliver%20Freyermuth&xrdhttpvorg=atlas&xrdhttphost=%5B%3A%3Affff%3AIPv4ADDRESSOFCLIENT%5D&xrdhttpdn=REDACTED HTTP/1.1\r\n> User-Agent: libdavix/0.6.4 neon/0.0.29\r\n```\r\nStill fine, also here, the redacted `xrdhttpdn` is nicely URL escaped. \r\n\r\nNow, I receive:\r\n```\r\n< HTTP/1.1 302 Redirect\r\n< Content-Length: 0\r\n< Location: http://xrootd001.physik.uni-bonn.de:1094/beegfs/grid/atlas/atlaslocalgroupdisk/?xrdhttptk=s6Q7i5fjNHzy17b/z/2hXA==&xrdhttptime=1504543303&xrdhttpname=Oliver Freyermuth&xrdhttpvorg=atlas&xrdhttphost=[::ffff:IPv4ADDRESSOFCLIENT]&xrdhttpdn=/C=DE/O=GermanGrid/REMAININGPARTREDACTED\r\n```\r\nHere:\r\n- xrdhttphost is not urlencoded. \r\n- xrdhttpdn is not urlencoded. \r\n\r\nNow, davix shows:\r\n```\r\n(Davix::HttpRequest) Error: Impossible to get the new redirected destination\r\n```\r\nand gives up - no request ever hits the data server. \r\n\r\nAm I missing something, or is this a bug in xrdhttp? "},"comment":{"url":"https://api.github.com/repos/xrootd/xrootd/issues/comments/327013872","html_url":"https://github.com/xrootd/xrootd/issues/577#issuecomment-327013872","issue_url":"https://api.github.com/repos/xrootd/xrootd/issues/577","id":327013872,"user":{"login":"olifre","id":166759,"avatar_url":"https://avatars0.githubusercontent.com/u/166759?v=4","gravatar_id":"","url":"https://api.github.com/users/olifre","html_url":"https://github.com/olifre","followers_url":"https://api.github.com/users/olifre/followers","following_url":"https://api.github.com/users/olifre/following{/other_user}","gists_url":"https://api.github.com/users/olifre/gists{/gist_id}","starred_url":"https://api.github.com/users/olifre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olifre/subscriptions","organizations_url":"https://api.github.com/users/olifre/orgs","repos_url":"https://api.github.com/users/olifre/repos","events_url":"https://api.github.com/users/olifre/events{/privacy}","received_events_url":"https://api.github.com/users/olifre/received_events","type":"User","site_admin":false},"created_at":"2017-09-04T18:42:13Z","updated_at":"2017-09-04T18:42:13Z","author_association":"NONE","body":"> For the records, which version of Davix are you using? \r\n```\r\n$ davix-ls --version                                                                                    \r\nVersion: 0.6.6-\r\n```\r\n\r\n> Have you also tried with curl ?\r\nI did that just now, here we go... Looks the same... \r\n```\r\ncurl -E /tmp/x509up_u1000 -X PROPFIND -vkL https://xrootd.somedomain:1094/beegfs/grid/atlas/atlaslocalgroupdisk\r\n[ ... lots of SSL stuff ... ]\r\n> PROPFIND /beegfs/grid/atlas/atlaslocalgroupdisk HTTP/1.1\r\n> Host: xrootd.somedomain:1094\r\n[...]\r\n< HTTP/1.1 302 Redirect\r\n< Content-Length: 0\r\n< Location: http://[::ffff:IPv4ADDRESSOFMGR]:1094/beegfs/grid/atlas/atlaslocalgroupdisk?xrdhttptk=wgvPwlDDRrv11zRRREiz0g==&xrdhttptime=1504550035&xrdhttpname=Oliver%20Freyermuth&xrdhttpvorg=atlas&xrdhttphost=%5B%3A%3Affff%3AIPv4ADDRESSOFCLIENT%5D&xrdhttpdn=%2FC=DE%2FO=GermanGrid%2FREMAININGPARTREDACTED\r\n[...]\r\n> PROPFIND /beegfs/grid/atlas/atlaslocalgroupdisk?xrdhttptk=wgvPwlDDRrv11zRRREiz0g==&xrdhttptime=1504550035&xrdhttpname=Oliver%20Freyermuth&xrdhttpvorg=atlas&xrdhttphost=%5B%3A%3Affff%3AIPv4ADDRESSOFCLIENT%5D&xrdhttpdn=%2FC=DE%2FO=GermanGrid%2FREMAININGPARTREDACTED HTTP/1.1\r\n[...]\r\n< HTTP/1.1 302 Redirect\r\n< Content-Length: 0\r\n< Location: http://xrootd001.somedomain:1094/beegfs/grid/atlas/atlaslocalgroupdisk?xrdhttptk=wgvPwlDDRrv11zRRREiz0g==&xrdhttptime=1504550035&xrdhttpname=Oliver Freyermuth&xrdhttpvorg=atlas&xrdhttphost=[::ffff:IPv4ADDRESSOFCLIENT]&xrdhttpdn=/C=DE/O=GermanGrid/REMAININGPARTREDACTED\r\n```\r\nAfter that, curl (as it was told) still performs the last, broken request, but receives an empty reply from the server. "}}
{"actor":{"display_login":"olifre"}}