XRootD
Loading...
Searching...
No Matches
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
24#include <XrdCl/XrdClLog.hh>
25
26using 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
39 m_handler->HandleResponse(new XrdCl::XRootDStatus(), obj);
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
Binary blob representation.
void FromString(const std::string str)
Fill the buffer from a string.
const uint64_t kLogXrdClHttp
const uint16_t errErrorResponse
const uint16_t errInvalidArgs
@ XAttr
Query file extended attributes.