comparison src/os/unix/ngx_channel.c @ 18:6f8b0dc0f8dd NGINX_0_1_9

nginx 0.1.9 *) Bugfix: the proxied request was sent without arguments if the request contains "//", "/./", "/../" or "%XX". *) Bugfix: the large compressed responses may be transferred not completely. *) Bugfix: the files bigger than 2G was not transferred on Linux that does not support sendfile64(). *) Bugfix: while the build configuration on Linux the --with-poll_module parameter was required; bug appeared in 0.1.8.
author Igor Sysoev <http://sysoev.ru>
date Thu, 25 Nov 2004 00:00:00 +0300
parents 8a529698ed55
children e1ada20fc595
comparison
equal deleted inserted replaced
17:9acb68bb0698 18:6f8b0dc0f8dd
15 ssize_t n; 15 ssize_t n;
16 ngx_err_t err; 16 ngx_err_t err;
17 struct iovec iov[1]; 17 struct iovec iov[1];
18 struct msghdr msg; 18 struct msghdr msg;
19 19
20 #if (HAVE_MSGHDR_MSG_CONTROL) 20 #if (NGX_HAVE_MSGHDR_MSG_CONTROL)
21 21
22 union { 22 union {
23 struct cmsghdr cm; 23 struct cmsghdr cm;
24 char space[CMSG_SPACE(sizeof(int))]; 24 char space[CMSG_SPACE(sizeof(int))];
25 } cmsg; 25 } cmsg;
81 ssize_t n; 81 ssize_t n;
82 ngx_err_t err; 82 ngx_err_t err;
83 struct iovec iov[1]; 83 struct iovec iov[1];
84 struct msghdr msg; 84 struct msghdr msg;
85 85
86 #if (HAVE_MSGHDR_MSG_CONTROL) 86 #if (NGX_HAVE_MSGHDR_MSG_CONTROL)
87 union { 87 union {
88 struct cmsghdr cm; 88 struct cmsghdr cm;
89 char space[CMSG_SPACE(sizeof(int))]; 89 char space[CMSG_SPACE(sizeof(int))];
90 } cmsg; 90 } cmsg;
91 #else 91 #else
98 msg.msg_name = NULL; 98 msg.msg_name = NULL;
99 msg.msg_namelen = 0; 99 msg.msg_namelen = 0;
100 msg.msg_iov = iov; 100 msg.msg_iov = iov;
101 msg.msg_iovlen = 1; 101 msg.msg_iovlen = 1;
102 102
103 #if (HAVE_MSGHDR_MSG_CONTROL) 103 #if (NGX_HAVE_MSGHDR_MSG_CONTROL)
104 msg.msg_control = (caddr_t) &cmsg; 104 msg.msg_control = (caddr_t) &cmsg;
105 msg.msg_controllen = sizeof(cmsg); 105 msg.msg_controllen = sizeof(cmsg);
106 #else 106 #else
107 msg.msg_accrights = (caddr_t) &fd; 107 msg.msg_accrights = (caddr_t) &fd;
108 msg.msg_accrightslen = sizeof(int); 108 msg.msg_accrightslen = sizeof(int);
129 ngx_log_error(NGX_LOG_ALERT, log, 0, 129 ngx_log_error(NGX_LOG_ALERT, log, 0,
130 "recvmsg() returned not enough data: %uz", n); 130 "recvmsg() returned not enough data: %uz", n);
131 return NGX_ERROR; 131 return NGX_ERROR;
132 } 132 }
133 133
134 #if (HAVE_MSGHDR_MSG_CONTROL) 134 #if (NGX_HAVE_MSGHDR_MSG_CONTROL)
135 135
136 if (ch->command == NGX_CMD_OPEN_CHANNEL) { 136 if (ch->command == NGX_CMD_OPEN_CHANNEL) {
137 137
138 if (cmsg.cm.cmsg_len < sizeof(cmsg)) { 138 if (cmsg.cm.cmsg_len < sizeof(cmsg)) {
139 ngx_log_error(NGX_LOG_ALERT, log, 0, 139 ngx_log_error(NGX_LOG_ALERT, log, 0,