X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-sp.git;a=blobdiff_plain;f=apache%2Fmod_shib.cpp;h=311297b3667641b05829a42ffd8eb04f30e6f5ba;hp=9cf6ab8bebdecb498f7c2e5419c2b968f64690ee;hb=7a8806efca2d7135ef9a3900b47329dbc5674f72;hpb=8cd71bd119708be18ea043a3e6c1518c4a51d3b8 diff --git a/apache/mod_shib.cpp b/apache/mod_shib.cpp index 9cf6ab8..311297b 100644 --- a/apache/mod_shib.cpp +++ b/apache/mod_shib.cpp @@ -415,7 +415,11 @@ public: return type ? type : ""; } long getContentLength() const { - return m_gotBody ? m_body.length() : m_req->remaining; + // Apache won't expose content length until the body's read. + if (!m_gotBody) { + getRequestBody(); + } + return m_body.length(); } string getRemoteAddr() const { string ret = AbstractSPRequest::getRemoteAddr();