1) we were retrieving our local port before APR filled it in; wait a
little longer :)
(maybe APR needs to be a little smarter about when/if to call
getsockname()? it could call it when the info is first needed and
not do it at all if never needed)
2) when the server dropped the connection before sending a properly-
delimited response, we entered a hard loop; we weren't reacting to
EOF/FIN properly
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85170
13f79535-47bb-0310-9956-
ffa450edef68
"bind: rfc1413: Error binding to local port");
return -1;
}
- ap_get_local_port(&sav_our_port, sock);
/*
* errors from connect usually imply the remote machine doesn't support
if (ap_connect(sock, NULL) != APR_SUCCESS)
return -1;
+ ap_get_local_port(&sav_our_port, sock);
ap_get_remote_port(&sav_rmt_port, sock);
/* send the data */
else if (j > 0) {
i+=j;
}
+ else if (status == APR_SUCCESS && j == 0) {
+ /* Oops... we ran out of data before finding newline */
+ return -1;
+ }
}
/* RFC1413_USERLEN = 512 */