XRootD
XrdClHttpOpQuery.cc
Go to the documentation of this file.
1 /******************************************************************************/
2 /* Copyright (C) 2025, Pelican Project, Morgridge Institute for Research */
3 /* */
4 /* This file is part of the XrdClHttp client plugin for XRootD. */
5 /* */
6 /* XRootD is free software: you can redistribute it and/or modify it under */
7 /* the terms of the GNU Lesser General Public License as published by the */
8 /* Free Software Foundation, either version 3 of the License, or (at your */
9 /* option) any later version. */
10 /* */
11 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
12 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
13 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
14 /* License for more details. */
15 /* */
16 /* The copyright holder's institutional names and contributor's names may not */
17 /* be used to endorse or promote products derived from this software without */
18 /* specific prior written permission of the institution or contributor. */
19 /******************************************************************************/
20 
21 #include "XrdClHttpOps.hh"
22 
23 #include <XrdCl/XrdClFileSystem.hh>
24 #include <XrdCl/XrdClLog.hh>
25 
26 using namespace XrdClHttp;
27 
29 {
30  SetDone(false);
31  m_logger->Debug(kLogXrdClHttp, "CurlQueryOp::Success");
32 
34  XrdCl::Buffer *qInfo = new XrdCl::Buffer();
35  qInfo->FromString(m_headers.GetETag());
36  auto obj = new XrdCl::AnyObject();
37  obj->Set(qInfo);
38 
40  m_handler = nullptr;
41  }
42  else {
43  m_logger->Error(kLogXrdClHttp, "Invalid information query type code");
44  Fail(XrdCl::errInvalidArgs, XrdCl::errErrorResponse, "Unsupported query code");
45  }
46 }
void SetDone(bool has_failed)
virtual void Fail(uint16_t errCode, uint32_t errNum, const std::string &)
XrdCl::ResponseHandler * m_handler
const std::string & GetETag() const
Binary blob representation.
Definition: XrdClBuffer.hh:34
void FromString(const std::string str)
Fill the buffer from a string.
Definition: XrdClBuffer.hh:205
void Error(uint64_t topic, const char *format,...)
Report an error.
Definition: XrdClLog.cc:231
void Debug(uint64_t topic, const char *format,...)
Print a debug message.
Definition: XrdClLog.cc:282
virtual void HandleResponse(XRootDStatus *status, AnyObject *response)
const uint16_t errErrorResponse
Definition: XrdClStatus.hh:105
const uint16_t errInvalidArgs
Definition: XrdClStatus.hh:58
const uint64_t kLogXrdClHttp
@ XAttr
Query file extended attributes.