Print

Print


@abh3 requested changes on this pull request.



> @@ -31,6 +31,8 @@ Prerelease Notes
   **Commit: 0f79a38
   **[XrdMacaroons] Fix authentication when different tokens are used in the same TCP session**
   **Commit: 4410d56
+  **[XrdHttp] 500 Internal Server Error on unknown checksum algorithm**
+  **Commit: 8c9fbb3

Out of curiosity, how do you know the final commit hash?

> @@ -1032,6 +1050,42 @@ void XrdHttpReq::mapXrdErrorToHttpStatus() {
   }
 }
 
+/**
+ * Select the checksum to be computed depending on the userDigest passed in parameter
+ * @param userDigest the digest request from the user (extracted from the Want-Digest header)
+ * @param selectedChecksum the checksum that will be performed
+ */
+void XrdHttpReq::selectChecksum(const std::string &userDigest, std::string & selectedChecksum) {
+    char * configChecksumList;
+    selectedChecksum = "unknown";
+    if((configChecksumList = getenv("XRD_CSLIST"))) {

Not that there is any significant performance penalty here but this transformation of XRD_CSLIST should really be done only once.

> @@ -31,6 +31,7 @@
 #include "XrdCl/XrdClPostMaster.hh"
 #include "XrdCl/XrdClXRootDTransport.hh"
 #include "XrdNet/XrdNetUtils.hh"
+#include "XrdUtils/XrdUtils.hh"

I see an introduction of a whole new utils scheme here. In general, utility functions should go into one of the established locations. In this case XrdOucUttils.hh and just add a static method to the class to avoid a namespace implementation. That, of course, leads to the next issue is that we would (in either case) have to implementation of this utility method -- one in XrdOucUtils (formerly XrdUtils) and one in XrdClUtils. The consensus is that the best solution is to convert usage of XrdClUtils::plitString to use the one in XrdOucUtils -- messy but fortunately it would only involve name changes. There are other alternatives here like adding a method to XrdOucString that does what splitstring does as there is already a similar method there called tokenize().

-- 
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/pull/1890#pullrequestreview-1276966743
You are receiving this because you are subscribed to this thread.

Message ID: <[log in to unmask]>

########################################################################
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