[][src]Struct async_fcgi::client::connection::Connection

pub struct Connection { /* fields omitted */ }

Single transport connection to a FCGI application

Can multiplex max_req_per_con simultaneous request streams

Implementations

impl Connection[src]

pub async fn connect<'_>(
    addr: &'_ FCGIAddr,
    max_req_per_con: u16
) -> Result<Connection, Box<dyn Error>>
[src]

Connect to a peer

pub fn is_ready(&self) -> bool[src]

true if the next call to forward does not need to wait for the end of some previous request

pub async fn forward<'_, B, I>(
    &'_ self,
    req: Request<B>,
    dyn_headers: I
) -> Result<Response<impl Body<Data = Bytes, Error = IoError>>, IoError> where
    B: Body + Unpin,
    I: IntoIterator<Item = (Bytes, Bytes)>, 
[src]

Forwards an HTTP request to a FGCI Application

Fills QUERY_STRING, REQUEST_METHOD, CONTENT_TYPE and CONTENT_LENGTH from the corresponding values in the Request. Headers in the Request will be added with the "HTTP_" prefix. (CGI/1.1 4.1.18)

Additional Params might be expected from the application (at least the url path):

  • SCRIPT_NAME must CGI/1.1 4.1.13, everybody cares
  • SERVER_NAME must CGI/1.1 4.1.14, flup cares for this
  • SERVER_PORT must CGI/1.1 4.1.15, flup cares for this
  • SERVER_PROTOCOL must CGI/1.1 4.1.16, flup cares for this
  • SERVER_SOFTWARE must CGI/1.1 4.1.17
  • REMOTE_ADDR must CGI/1.1 4.1.8
  • GATEWAY_INTERFACE must CGI/1.1 4.1.4
  • REMOTE_HOST should CGI/1.1 4.1.9
  • REMOTE_IDENT may CGI/1.1 4.1.10
  • REMOTE_USER opt CGI/1.1
  • AUTH_TYPE opt CGI/1.1
  • PATH_INFO opt CGI/1.1 4.1.5 extra-path
  • PATH_TRANSLATED opt CGI/1.1 4.1.6
  • SCRIPT_FILENAME PHP cares for this
  • REMOTE_PORT common
  • SERVER_ADDR common
  • REQUEST_URI common
  • DOCUMENT_URI common
  • DOCUMENT_ROOT common

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.