Fixed segmentation fault if http context is not defined.
Removed unneeded and invalid initialization.
Obtain port from r->connection->local_sockaddr.

This eliminates segfaults caused by unset (NULL) r->port_start
and non-NULL r->port_end. In fact, r->port_start is always NULL,
so it is useless to rely on this pointer.