@abh3 requested changes on this pull request.

Almost there!


In src/XrdHttp/XrdHttpReq.cc:

> @@ -661,6 +661,15 @@ bool XrdHttpReq::Redir(XrdXrootd::Bridge::Context &info, //!< the result context
   else
     redirdest = "Location: http://";
   
+  // port < 0 signals switch to full URL
+  if (port < 0)
+  {
+    if (string(hname).find("file://") != string::npos)

Well, that is not a safe comparison as you may get a match even though it's not a file-local URL. You should do this

if (strncmp(hname, "file://", 7) == 0)

that's better than the "std" alternative
if (string(hname).rfind("file://", 0) == 0)
as you don't have to allocate memory to do this simple comparison.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/pull/1242#pullrequestreview-447658618", "url": "https://github.com/xrootd/xrootd/pull/1242#pullrequestreview-447658618", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1