Squid still does not support [external] custom reason phrases and,
hence, cannot reliably support eCAP API that sets the reason phrase to
the one supplied by the adapter. This and r14398 changes fix [known]
regression bugs introduced by r12728 ("SourceLayout").
}
void
-Adaptation::Ecap::StatusLineRep::reasonPhrase(const Area &str)
+Adaptation::Ecap::StatusLineRep::reasonPhrase(const Area &)
{
- theMessage.sline.set(theMessage.sline.version, theMessage.sline.status(), str.toString().c_str());
+ // Squid does not support external custom reason phrases so we have
+ // to just reset it (in case there was a custom internal reason set)
+ theMessage.sline.resetReason();
}
Adaptation::Ecap::StatusLineRep::Area
/// set this status-line to the given values
/// when reason is NULL the default message text for this StatusCode will be used
+ /// when reason is not NULL, it must not point to a dynamically allocated value
void set(const AnyP::ProtocolVersion &newVersion, Http::StatusCode newStatus, const char *newReason = NULL);
+ /// reset the reason phrase to its default status code-derived value
+ void resetReason() { reason_ = nullptr; }
+
/// retrieve the status code for this status line
Http::StatusCode status() const { return status_; }