Fixed showing TOS floater.
This creates a separate events interface structure for CurlResponderBuffer (AICurlResponderBufferEvents) for dealing with received HTTP headers. The headers are passed to the Responder, but only if the class derived from Responder implements completedHeaders (otherwise it makes little sense to even decode the headers). Basically this is a reimplementation of the functionality of the old LLHTTPClientURLAdaptor class.
This commit is contained in:
@@ -59,10 +59,13 @@ public:
|
||||
|
||||
LLHandle<LLFloater> mParent;
|
||||
|
||||
virtual bool needsHeaders(void) const { return true; }
|
||||
|
||||
virtual void completedHeader(U32 status, const std::string& reason, const LLSD& content)
|
||||
virtual void completedHeaders(U32 status, std::string const& reason, AIHTTPHeaders const& headers)
|
||||
{
|
||||
std::string media_type = content["content-type"].asString();
|
||||
std::string media_type;
|
||||
bool content_type_found = headers.getValue("content-type", media_type);
|
||||
llassert_always(content_type_found);
|
||||
std::string::size_type idx1 = media_type.find_first_of(";");
|
||||
std::string mime_type = media_type.substr(0, idx1);
|
||||
completeAny(status, mime_type);
|
||||
|
||||
Reference in New Issue
Block a user