Add missing needHeaders
The AIBufferedCurlEasyRequestEvents are not triggered unless the derived class return true for needsHeaders(). That means, every class that implements received_HTTP_header(), received_header() or completed_headers(), or implement the virtual function completedHeaders(), or use the protected member mReceivedHeaders directly. This commits adds missing needsHeaders() for LLAvatarNameCache (thanks Siana) and XMLRPCResponder. The former now uses mReceivedHeaders directly instead of making a copy.
This commit is contained in:
@@ -182,7 +182,7 @@ private:
|
||||
std::vector<LLUUID> mAgentIDs;
|
||||
|
||||
// Need the headers to look up Expires: and Retry-After:
|
||||
AIHTTPReceivedHeaders mHeaders;
|
||||
virtual bool needsHeaders(void) const { return true; }
|
||||
|
||||
public:
|
||||
virtual AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return avatarNameResponder_timeout; }
|
||||
@@ -190,16 +190,11 @@ public:
|
||||
LLAvatarNameResponder(const std::vector<LLUUID>& agent_ids)
|
||||
: mAgentIDs(agent_ids)
|
||||
{ }
|
||||
|
||||
/*virtual*/ void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& headers)
|
||||
{
|
||||
mHeaders = headers;
|
||||
}
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
{
|
||||
// Pull expiration out of headers if available
|
||||
F64 expires = LLAvatarNameCache::nameExpirationFromHeaders(mHeaders);
|
||||
F64 expires = LLAvatarNameCache::nameExpirationFromHeaders(mReceivedHeaders);
|
||||
F64 now = LLFrameTimer::getTotalSeconds();
|
||||
|
||||
LLSD agents = content["agents"];
|
||||
|
||||
Reference in New Issue
Block a user