proxygen
|
#include <RejectConnectFilter.h>
Public Member Functions | |
RejectConnectFilter (RequestHandler *upstream) | |
void | onRequest (std::unique_ptr< HTTPMessage >) noexceptoverride |
void | onBody (std::unique_ptr< folly::IOBuf >) noexceptoverride |
void | onUpgrade (UpgradeProtocol) noexceptoverride |
void | onEOM () noexceptoverride |
void | requestComplete () noexceptoverride |
void | onError (ProxygenError err) noexceptoverride |
void | onEgressPaused () noexceptoverride |
void | onEgressResumed () noexceptoverride |
void | sendHeaders (HTTPMessage &) noexceptoverride |
void | sendChunkHeader (size_t) noexceptoverride |
void | sendBody (std::unique_ptr< folly::IOBuf >) noexceptoverride |
void | sendChunkTerminator () noexceptoverride |
void | sendEOM () noexceptoverride |
void | sendAbort () noexceptoverride |
void | refreshTimeout () noexceptoverride |
Public Member Functions inherited from proxygen::Filter | |
Filter (RequestHandler *upstream) | |
void | setResponseHandler (ResponseHandler *handler) noexceptoverride |
void | onRequest (std::unique_ptr< HTTPMessage > headers) noexceptoverride |
void | onBody (std::unique_ptr< folly::IOBuf > body) noexceptoverride |
void | onUpgrade (UpgradeProtocol protocol) noexceptoverride |
void | onEOM () noexceptoverride |
void | requestComplete () noexceptoverride |
void | onError (ProxygenError err) noexceptoverride |
void | onEgressPaused () noexceptoverride |
void | onEgressResumed () noexceptoverride |
bool | canHandleExpect () noexceptoverride |
ExMessageHandler * | getExHandler () noexceptoverride |
void | sendHeaders (HTTPMessage &msg) noexceptoverride |
void | sendChunkHeader (size_t len) noexceptoverride |
void | sendBody (std::unique_ptr< folly::IOBuf > body) noexceptoverride |
void | sendChunkTerminator () noexceptoverride |
void | sendEOM () noexceptoverride |
void | sendAbort () noexceptoverride |
void | refreshTimeout () noexceptoverride |
void | pauseIngress () noexceptoverride |
void | resumeIngress () noexceptoverride |
ResponseHandler * | newPushedResponse (PushHandler *handler) noexceptoverride |
const wangle::TransportInfo & | getSetupTransportInfo () const noexceptoverride |
void | getCurrentTransportInfo (wangle::TransportInfo *tinfo) const override |
Public Member Functions inherited from proxygen::RequestHandler | |
virtual ResponseHandler * | getDownstream () noexcept |
virtual | ~RequestHandler () |
Public Member Functions inherited from proxygen::ResponseHandler | |
ResponseHandler (RequestHandler *upstream) | |
virtual | ~ResponseHandler () |
virtual ResponseHandler * | newExMessage (ExMessageHandler *, bool=false) noexcept |
HTTPTransaction * | getTransaction () const noexcept |
Additional Inherited Members | |
Protected Attributes inherited from proxygen::RequestHandler | |
ResponseHandler * | downstream_ {nullptr} |
Protected Attributes inherited from proxygen::ResponseHandler | |
RequestHandler * | upstream_ {nullptr} |
HTTPTransaction * | txn_ {nullptr} |
A filter that rejects CONNECT/UPGRADE requests.
Definition at line 21 of file RejectConnectFilter.h.
|
inlineexplicit |
Definition at line 23 of file RejectConnectFilter.h.
Referenced by proxygen::RejectConnectFilterFactory::onRequest().
|
inlineoverridevirtualnoexcept |
Invoked when we get part of body for the request.
Implements proxygen::RequestHandler.
Definition at line 33 of file RejectConnectFilter.h.
|
inlineoverridevirtualnoexcept |
Signals from HTTP layer when client queue is full or empty. If you are sending a streaming response, consider implementing these and acting accordingly. Saves your server from running out of memory.
Reimplemented from proxygen::RequestHandler.
Definition at line 55 of file RejectConnectFilter.h.
|
inlineoverridevirtualnoexcept |
Reimplemented from proxygen::RequestHandler.
Definition at line 58 of file RejectConnectFilter.h.
|
inlineoverridevirtualnoexcept |
Invoked when we finish receiving the body.
Implements proxygen::RequestHandler.
Definition at line 37 of file RejectConnectFilter.h.
|
inlineoverridevirtualnoexcept |
Request failed. Maybe because of read/write error on socket or client not being able to send request in time.
NOTE: Can be invoked at any time (except for before onRequest).
No more callbacks will be invoked after this. You should clean up after yourself.
Implements proxygen::RequestHandler.
Definition at line 45 of file RejectConnectFilter.h.
References proxygen::RequestHandler::onError(), and proxygen::ResponseHandler::upstream_.
|
inlineoverridevirtualnoexcept |
Invoked when we have successfully fetched headers from client. This will always be the first callback invoked on your handler.
Implements proxygen::RequestHandler.
Definition at line 26 of file RejectConnectFilter.h.
References proxygen::RequestHandler::downstream_, proxygen::kErrorMethodNotSupported, proxygen::RequestHandler::onError(), proxygen::ResponseBuilder::rejectUpgradeRequest(), and proxygen::ResponseHandler::upstream_.
|
inlineoverridevirtualnoexcept |
Invoked when the session has been upgraded to a different protocol
Implements proxygen::RequestHandler.
Definition at line 35 of file RejectConnectFilter.h.
|
inlineoverridevirtualnoexcept |
Implements proxygen::ResponseHandler.
Definition at line 77 of file RejectConnectFilter.h.
|
inlineoverridevirtualnoexcept |
Invoked when request processing has been completed and nothing more needs to be done. This may be a good place to log some stats and clean up resources. This is distinct from onEOM() because it is invoked after the response is fully sent. Once this callback has been received, downstream_
should be considered invalid.
Implements proxygen::RequestHandler.
Definition at line 40 of file RejectConnectFilter.h.
References proxygen::ResponseHandler::upstream_.
|
inlineoverridevirtualnoexcept |
Implements proxygen::ResponseHandler.
Definition at line 74 of file RejectConnectFilter.h.
|
inlineoverridevirtualnoexcept |
|
inlineoverridevirtualnoexcept |
|
inlineoverridevirtualnoexcept |
Implements proxygen::ResponseHandler.
Definition at line 68 of file RejectConnectFilter.h.
|
inlineoverridevirtualnoexcept |
Implements proxygen::ResponseHandler.
Definition at line 71 of file RejectConnectFilter.h.
|
inlineoverridevirtualnoexcept |
NOTE: We take response message as non-const reference, to allow filters between your handler and client to be able to modify response if they want to.
eg. a compression filter might want to change the content-encoding
Implements proxygen::ResponseHandler.
Definition at line 62 of file RejectConnectFilter.h.