Return the address of the remote user from the squeasel request info.
| 267 | |
| 268 | // Return the address of the remote user from the squeasel request info. |
| 269 | kudu::Sockaddr GetRemoteAddress(const struct sq_request_info* req) { |
| 270 | struct sockaddr_in addr; |
| 271 | memset(&addr, 0, sizeof(addr)); |
| 272 | addr.sin_family = AF_INET; |
| 273 | addr.sin_port = NetworkByteOrder::FromHost16(req->remote_port); |
| 274 | addr.sin_addr.s_addr = NetworkByteOrder::FromHost32(req->remote_ip); |
| 275 | return kudu::Sockaddr(addr); |
| 276 | } |
| 277 | |
| 278 | |
| 279 | // Performs a step of SPNEGO authorization by parsing the HTTP Authorization header |
no test coverage detected