MCPcopy Create free account
hub / github.com/apache/trafficserver / StateAuthProxyReadContent

Function StateAuthProxyReadContent

plugins/authproxy/authproxy.cc:568–586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

566}
567
568static TSEvent
569StateAuthProxyReadContent(AuthRequestContext *auth, void * /* edata ATS_UNUSED */)
570{
571 unsigned needed;
572 int64_t avail = 0;
573
574 avail = TSIOBufferReaderAvail(auth->iobuf.reader);
575 needed = HttpGetContentLength(auth->rheader.buffer, auth->rheader.header);
576
577 AuthLogDebug("we have %u of %u needed bytes", (unsigned)avail, needed);
578
579 if (avail >= needed) {
580 // OK, we have what we need. Let's respond to the client request.
581 AuthChainAuthorizationResponse(auth);
582 return TS_EVENT_HTTP_SEND_RESPONSE_HDR;
583 }
584
585 return TS_EVENT_CONTINUE;
586}
587
588static TSEvent
589StateAuthProxyCompleteContent(AuthRequestContext *auth, void * /* edata ATS_UNUSED */)

Callers

nothing calls this directly

Calls 3

TSIOBufferReaderAvailFunction · 0.85
HttpGetContentLengthFunction · 0.85

Tested by

no test coverage detected