125 |
*/ |
*/ |
126 |
static char *get_host_header(Socket_T s, char *hostbuf) { |
static char *get_host_header(Socket_T s, char *hostbuf) { |
127 |
|
|
128 |
if(! strcmp(LOCALHOST, Socket_get_remote_hostname(s)) || |
if(! strcmp(LOCALHOST, socket_get_remote_hostname(s)) || |
129 |
inet_aton(Socket_get_remote_hostname(s), NULL)) { |
inet_aton(socket_get_remote_hostname(s), NULL)) { |
130 |
|
|
131 |
*hostbuf= 0; |
*hostbuf= 0; |
132 |
|
|
133 |
} else { |
} else { |
134 |
|
|
135 |
snprintf(hostbuf, STRLEN, "%s:%d", |
snprintf(hostbuf, STRLEN, "%s:%d", |
136 |
Socket_get_remote_hostname(s), |
socket_get_remote_hostname(s), |
137 |
socket_get_remote_port(s)); |
socket_get_remote_port(s)); |
138 |
|
|
139 |
} |
} |