<div class="gmail_quote">On Thu, Oct 29, 2009 at 12:36 PM, Steve Steiner (listsin) <span dir="ltr"><<a href="mailto:listsin@integrateddevcorp.com">listsin@integrateddevcorp.com</a>></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>
> On Thursday 29 October 2009, Steve Steiner (listsin) wrote:<br>
><br>
>> I can browse to either URL in any browser, getPage() works fine on<br>
>> the<br>
>> external address, 404's on the localhost address.<br>
><br>
> Does the same thing happen with "127.0.0.1" instead of "localhost"<br>
> in the<br>
> URL? I once encountered a nasty setup where a machine itself did not<br>
> have<br>
> "localhost" in /etc/hosts and the DNS server returned the IP address<br>
> of<br>
> 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'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 '/Applications/Validator-<br>
SAC.app/Contents/Resources/validator/httpd/cgi-bin/check_wrapper.sh'<br>
<br>
Thing that'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't get it either!<br>
<br>
So:<br>
curl <a href="http://localhost/w3c-validator/check" target="_blank">http://localhost/w3c-validator/check</a> <-- returns HTML code<br>
any browser to <a href="http://localhost/w3c-validator/check" target="_blank">http://localhost/w3c-validator/check</a> <-- returns HTML<br>
code<br>
t.w.c.getPage("<a href="http://localhost/w3c-validator/check" target="_blank">http://localhost/w3c-validator/check</a>") <-- 404<br>
wget <a href="http://localhost/w3c-validator/check" target="_blank">http://localhost/w3c-validator/check</a> <-- 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 "resolve that address" 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>