| 586 | } |
| 587 | |
| 588 | static TSEvent |
| 589 | StateAuthProxyCompleteContent(AuthRequestContext *auth, void * /* edata ATS_UNUSED */) |
| 590 | { |
| 591 | unsigned needed; |
| 592 | int64_t avail; |
| 593 | |
| 594 | avail = TSIOBufferReaderAvail(auth->iobuf.reader); |
| 595 | needed = HttpGetContentLength(auth->rheader.buffer, auth->rheader.header); |
| 596 | |
| 597 | AuthLogDebug("we have %u of %u needed bytes", (unsigned)avail, needed); |
| 598 | |
| 599 | if (avail >= needed) { |
| 600 | // OK, we have what we need. Let's respond to the client request. |
| 601 | AuthChainAuthorizationResponse(auth); |
| 602 | return TS_EVENT_HTTP_SEND_RESPONSE_HDR; |
| 603 | } |
| 604 | // We got EOS before reading all the content we expected. |
| 605 | return TS_EVENT_ERROR; |
| 606 | } |
| 607 | |
| 608 | // Terminal state. Force a 403 Forbidden response. |
| 609 | static TSEvent |
nothing calls this directly
no test coverage detected