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.

please file a Jira on this issue, as aways, patch is welcome.

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


- Yongming Zhao 赵永明

> 在 2015年1月7日,下午12:05,Masaori Koshiba <[email protected]> 写道:
> 
> Hello,
> 
> 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?
> 
> # Details
> 
> 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,
> 
> ----
> curl -x localhost:8080 http://aaa/
> ----
> 
> As far as I understand, the behavior of ATS is below.
> 
> 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'.
> 
> I just want ATS to add only '.yahoo.co.jp', my local domain, and return "502 
> Cannot find server".
> 
> # My Settings
> 
> My settings are below. If you need more details, please tell me.
> 
> ## 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
> ----
> 
> ## /etc/resolv.conf
> ----
> domain          yahoo.co.jp
> ----
> 
> Thanks,
> Masaori

Reply via email to