On Fri, 4 Aug 2000, Konstantin Tokar wrote:
> GET /test HTTP/1.1
> User-Agent: Mozilla/4.72 [en] (WinNT; I)
> Host: tokar.mpei.ac.ru
���������� ���� - ������ ������ ���������� ���������.
Igor Khasilev |
PACO Links, [EMAIL PROTECTED] |
Index: modules/accel.c
===================================================================
RCS file: /usr/local/cvs/oops/src/modules/accel.c,v
retrieving revision 1.11
diff -c -r1.11 accel.c
*** accel.c 2000/06/16 21:36:58 1.11
--- accel.c 2000/08/04 21:38:34
***************
*** 804,814 ****
/* rewrite 'Host:' (if configured) */
if ( rewrite_host && (host_av = lookup_av_by_attr(rq->av_pairs, "host:") ) ) {
if (host_av->val) free(host_av->val);
! host_av->val = strdup(rq->url.host);
}
if ( !TEST(rq->flags, RQ_HAS_HOST) && rq->url.host) {
/* insert Host: header */
! put_av_pair(&rq->av_pairs, "Host:", rq->url.host);
}
/* check if we have to change refresh patt for this request */
if ( refr_patts ) {
--- 804,833 ----
/* rewrite 'Host:' (if configured) */
if ( rewrite_host && (host_av = lookup_av_by_attr(rq->av_pairs, "host:") ) ) {
if (host_av->val) free(host_av->val);
! if ( rq->url.port == 80 )
! host_av->val = strdup(rq->url.host);
! else {
! char *new_host_v = xmalloc(strlen(rq->url.host) + 20, "");
! if ( new_host_v ) {
! sprintf(new_host_v, "%s:%d", rq->url.host, rq->url.port);
! host_av->val = new_host_v;
! } else
! host_av->val = strdup(rq->url.host);
! }
}
if ( !TEST(rq->flags, RQ_HAS_HOST) && rq->url.host) {
/* insert Host: header */
! if ( rq->url.port == 80 )
! put_av_pair(&rq->av_pairs, "Host:", rq->url.host);
! else {
! char *new_host_v = xmalloc(strlen(rq->url.host) + 20, "");
! if ( new_host_v ) {
! sprintf(new_host_v, "%s:%d", rq->url.host, rq->url.port);
! put_av_pair(&rq->av_pairs, "Host:", new_host_v);
! xfree(new_host_v);
! } else
! put_av_pair(&rq->av_pairs, "Host:", rq->url.host);
! }
}
/* check if we have to change refresh patt for this request */
if ( refr_patts ) {