<div class="gmail_quote">On Thu, Oct 29, 2009 at 12:36 PM, Steve Steiner (listsin) <span dir="ltr">&lt;<a href="mailto:listsin@integrateddevcorp.com">listsin@integrateddevcorp.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Oct 29, 2009, at 1:10 PM, Maarten ter Huurne wrote:<br>
<br>
&gt; On Thursday 29 October 2009, Steve Steiner (listsin) wrote:<br>
&gt;<br>
&gt;&gt; I can browse to either URL in any browser, getPage() works fine on<br>
&gt;&gt; the<br>
&gt;&gt; external address, 404&#39;s on the localhost address.<br>
&gt;<br>
&gt; Does the same thing happen with &quot;127.0.0.1&quot; instead of &quot;localhost&quot;<br>
&gt; in the<br>
&gt; URL? I once encountered a nasty setup where a machine itself did not<br>
&gt; have<br>
&gt; &quot;localhost&quot; in /etc/hosts and the DNS server returned the IP address<br>
&gt; of<br>
&gt; another machine on the network...<br>
<br>
</div>Yes, unfortunately, same thing and the hosts file is also correct.<br>
<br>
This is in OS X, and the valida†or URL I&#39;m calling is being served by<br>
Apache 2.2, and is a ScriptAlias like so (in an includ of httpd.conf):<br>
<br>
ScriptAlias      /w3c-validator/check   &#39;/Applications/Validator-<br>
SAC.app/Contents/Resources/validator/httpd/cgi-bin/check_wrapper.sh&#39;<br>
<br>
Thing that&#39;s got me baffled is that I can go to it just fine in a<br>
browser, I can `curl` it, but, now, after a little more digging, wget<br>
can&#39;t get it either!<br>
<br>
So:<br>
curl  <a href="http://localhost/w3c-validator/check" target="_blank">http://localhost/w3c-validator/check</a>                         &lt;-- returns HTML code<br>
any browser to  <a href="http://localhost/w3c-validator/check" target="_blank">http://localhost/w3c-validator/check</a>  &lt;-- returns HTML<br>
code<br>
t.w.c.getPage(&quot;<a href="http://localhost/w3c-validator/check" target="_blank">http://localhost/w3c-validator/check</a>&quot;) &lt;-- 404<br>
wget  <a href="http://localhost/w3c-validator/check" target="_blank">http://localhost/w3c-validator/check</a>                 &lt;-- 404<br>
<br>
So what the heck is the difference in how these things resolve that<br>
address!?<br>
<br>
Thanks,<br>
<div><div></div><div class="h5"><br>
S<br>
<br></div></div></blockquote><div><br></div></div>When you say &quot;resolve that address&quot; do you mean the IP Address  or the URL?<br><br>If the requests are in fact going to the same address (IP), I would take a look at the HTTP headers for each method and compare them.  Wget failing in a similar fashion to getPage() may actually help you diagnose this.<br>
<br>Kevin Horn<br>