Skip to content
Uplusware edited this page Sep 12, 2017 · 30 revisions

Brief

Use extension, you can design your application, for example:

  • HTTP Reverse Proxy
  • Self-defined script

Implementation

ext_request

void* ext_request(CHttp* http_session,
    const char * name, const char * description,
    const char * parameters, 
    BOOL* skip);

This function will be called after http request has been recieved.

ext_response

void* ext_response(CHttp* http_session,
    const char * name, const char * description,
    const char * parameters,
    Htdoc* doc);

This function will be called before http response will be sent.

ext_finish

void* ext_finish(CHttp* http_session,
    const char * name, const char * description,
    const char * parameters,
    Htdoc* doc);

This function will be called after the whole http trip is finished.

Some resource(heap memory, file descriptor ...) clean work can be done in it.

ext_tunneling

void* ext_tunneling(CHttp* http_session,
    const char * name, const char * description,
    const char * parameters,
    const char* to_address, unsigned short port,
    http_ext_tunneling_continuing* is_continuing);

This function will be called before each http tunneling is created.