req_server_port(agooReq r) {
    int		len;
    const char	*host;
    const char	*colon;

    if (NULL == r) {
	rb_raise(rb_eArgError, "Request is no longer valid.");
    }
    if (NULL == (host = agoo_con_header_value(r->header.start, r->header.len, "Host", &len))) {
	return Qnil;
    }
    for (colon = host + len - 1; host < colon; colon--) {
	if (':' == *colon) {
	    break;
	}
    }
    if (host == colon) {
	return Qnil;
    }
    return rb_str_new(colon + 1, host + len - colon - 1);
}
req_server_port(agooReq r) {
    int		len;
    const char	*host;
    const char	*colon;

    if (NULL == r) {
	rb_raise(rb_eArgError, "Request is no longer valid.");
    }
    if (NULL == (host = agoo_con_header_value(r->header.start, r->header.len, "Host", &len))) {
	return Qnil;
    }
    for (colon = host + len - 1; host < colon; colon--) {
	if (':' == *colon) {
	    break;
	}
    }
    if (host == colon) {
	return Qnil;
    }
    return rb_str_new(colon + 1, host + len - colon - 1);
}