Request: fix doc for is_content_type()

Signed-off-by: Eduardo Silva <eduardo@monkey.io>
Request: when allocating buffer on get_data(), allocate an extra byte

Signed-off-by: Eduardo Silva <eduardo@monkey.io>
Request: on header_cmp(), use Header name without colon.

Signed-off-by: Eduardo Silva <eduardo@monkey.io>
Response: validate HTTP status when sending direct headers

Signed-off-by: Eduardo Silva <eduardo@monkey.io>
Router: deprecate old reference to Console stuff

Signed-off-by: Eduardo Silva <eduardo@monkey.io>
Params: rewrite get() method to use new Router mechanism.

This patch reimplement how the get() method works. Since the introduction
of the new Router mechanism and the support of dynamic variables on the URL,
the get() method allows to retrieve values based on key names, e.g:

  Router:  /test/:name/about/
  URL   :  /test/eduardo/about/

when using the API:

  char *name = param->get(dr, "name")

The 'name' variable references a new memory allocation with the 'eduardo'
string on it. The buffer is auto-freed once the callback ends.

Signed-off-by: Eduardo Silva <eduardo@monkey.io>
Params: rewrite get_number() to align to new Router API

This patch reimplement the param->get_number() method where now it
uses the new Router mechanism to retrieve numeric values coming from
the URL, e.g:

  Router:  /test/:name/:id/about/
  URL   :  /test/eduardo/12345/about/

when using the API:

  int ret;
  long val

  ret = param->get_number(dr, "name", &val);
  if (ret == 0) {
     /* val = 12345 */
  }

Signed-off-by: Eduardo Silva <eduardo@monkey.io>