Return-Path: X-Original-To: apmail-trafficserver-users-archive@www.apache.org Delivered-To: apmail-trafficserver-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 38E9917D07 for ; Thu, 8 Jan 2015 13:17:42 +0000 (UTC) Received: (qmail 31538 invoked by uid 500); 8 Jan 2015 13:17:43 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 31486 invoked by uid 500); 8 Jan 2015 13:17:43 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 31476 invoked by uid 99); 8 Jan 2015 13:17:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jan 2015 13:17:42 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ming.zym@gmail.com designates 209.85.220.43 as permitted sender) Received: from [209.85.220.43] (HELO mail-pa0-f43.google.com) (209.85.220.43) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jan 2015 13:17:37 +0000 Received: by mail-pa0-f43.google.com with SMTP id kx10so11754450pab.2 for ; Thu, 08 Jan 2015 05:15:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=H/g+KE+WwZn7Mr6HoswEqwkwh3pXlaG5ATluwijAMNI=; b=LYU60ymmWxSb/6EvfbuFClpcUsXBVe9dob5VegHcyUAZ9R1qVMitoCk1FdoLEdID38 UNYqiMfMHvzGJbFFwesF0hx6EkQcHcNDXu/v9j57DfifyqmKPTh9rODa0QKt89XRRiXC IshUpJxNv3tPDj54HKXAEC4ol7gPlBO7c7Kmz5OeVTOqtRFvuM1/SfeOf5sXFSCB4K4z Ydgrika5vnkH9PE/kGcNr8H9RjGTRakxhFILJ74fEx/5XQdDVRDrwpr8P5hHvmNqDnKE Kpr+OSvRDK3+kOy2NoBq801eEwXkPe22l1V06plvgx85yYWR4yHvzefxmPf/5bz0bw92 96Mw== X-Received: by 10.70.130.73 with SMTP id oc9mr14909322pdb.42.1420722902227; Thu, 08 Jan 2015 05:15:02 -0800 (PST) Received: from [10.8.44.6] ([71.6.150.202]) by mx.google.com with ESMTPSA id ds16sm4519814pdb.65.2015.01.08.05.14.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Jan 2015 05:15:01 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: A question on expanding unqualified hostnames with local domain From: Yongming Zhao In-Reply-To: <39623B34-7823-4667-98CB-DAA8C2391046@yahoo-corp.jp> Date: Thu, 8 Jan 2015 21:14:51 +0800 Cc: "cdn-pj@mail.yahoo.co.jp" Content-Transfer-Encoding: quoted-printable Message-Id: <0AB03966-FC50-46E9-A5E8-B50F643C77A7@gmail.com> References: <39623B34-7823-4667-98CB-DAA8C2391046@yahoo-corp.jp> To: users@trafficserver.apache.org X-Mailer: Apple Mail (2.1993) X-Virus-Checked: Checked by ClamAV on apache.org I think by design, if proxy.config.dns.search_default_domains is set to = =E2=80=9C1=E2=80=9D, it will put the default domain into the search = list, which will a merged with the search domains. the man page on resolve.conf show that the search domain will be set to = default domain by default, hehe. I thinks that most of the domain & search functions will be used in the = forward proxy use case, where mostly a mix of internet and intranet. if = someone is running on this dependence, I would like to hear how is your = concern. thanks - Yongming Zhao =E8=B5=B5=E6=B0=B8=E6=98=8E > =E5=9C=A8 2015=E5=B9=B41=E6=9C=888=E6=97=A5=EF=BC=8C=E4=B8=8B=E5=8D=885:= 24=EF=BC=8CMasaori Koshiba =E5=86=99=E9=81=93=EF=BC= =9A >=20 > Filed as TS-3281. I'll send a patch later. >=20 > Actually, I don't intend ATS to do the domain name expanding. I found = the behavior by chance. >=20 > 2015/01/08 16:51=E3=80=81Yongming Zhao = =E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB=EF=BC=9A >=20 >> well, looks like a bug for me. the domain & search in resolv.conf is = very complex handled in the dns resolver codes, and worse when deal with = splitdns. >>=20 >> please file a Jira on this issue, as aways, patch is welcome. >>=20 >> btw, why would you want ATS to do the domain name expanding for you? = I think most of our modern clients will try to make the expanding on UA = side, right? I had think of removing the domain and search functions = from the resolver codes, haha >>=20 >>=20 >> - Yongming Zhao =E8=B5=B5=E6=B0=B8=E6=98=8E >>=20 >>> =E5=9C=A8 2015=E5=B9=B41=E6=9C=887=E6=97=A5=EF=BC=8C=E4=B8=8B=E5=8D=88= 12:05=EF=BC=8CMasaori Koshiba =E5=86=99=E9=81=93=EF= =BC=9A >>>=20 >>> Hello, >>>=20 >>> I got a problem with resolving unqualified hostnames by expanding to = the local domain. >>> It looks like ATS splits the local domain in 2 domains. >>> Is there any settings to restrain ATS splitting the local domain? >>>=20 >>> # Details >>>=20 >>> Although my local domain is 'yahoo.co.jp', ATS expands the domain = 'aaa' to 'aaa.co.jp' when I send a proxy request like following, >>>=20 >>> ---- >>> curl -x localhost:8080 http://aaa/ >>> ---- >>>=20 >>> As far as I understand, the behavior of ATS is below. >>>=20 >>> 1. When ATS start, ATS load the local domain from resolv.conf and = add 'yahoo.co.jp' and 'co.jp' to domain list. >>> 2. ATS recives the request. >>> 3. ATS adds '.yahoo.co.jp' to the domain and queries = 'aaa.yahoo.co.jp'. This query fails because there no such domain. >>> 4. ATS adds '.co.jp' to the domain and queries 'aaa.co.jp'. >>>=20 >>> I just want ATS to add only '.yahoo.co.jp', my local domain, and = return "502 Cannot find server". >>>=20 >>> # My Settings >>>=20 >>> My settings are below. If you need more details, please tell me. >>>=20 >>> ## records.config >>> ---- >>> CONFIG proxy.config.http.server_ports STRING 8080 >>> CONFIG proxy.config.url_remap.remap_required INT 0 >>> CONFIG proxy.config.dns.search_default_domains INT 1 >>> CONFIG proxy.config.dns.resolv_conf STRING /etc/resolv.conf >>> ---- >>>=20 >>> ## /etc/resolv.conf >>> ---- >>> domain yahoo.co.jp >>> ---- >>>=20 >>> Thanks, >>> Masaori >>=20 >=20