[REBOL] bug in 'read ?
From: hallvard:ystad:helpinhand at: 24-Nov-2002 13:19
Hi list
Here's from a console session:
>> trace/net on
>> t: read http://go.kvasir.sol.no/f/http://www.annonse.no/
URL Parse: none none go.kvasir.sol.no none f/http://www.annonse.no/ none
Net-log: ["Opening tcp for" HTTP]
connecting to: go.kvasir.sol.no
Net-log: {GET /f/http://www.annonse.no/ HTTP/1.0
Accept: */*
Connection: close
User-Agent: REBOL 2.5.0.3.1
Host: go.kvasir.sol.no
}
Net-log: "HTTP/1.1 302 Found"
URL Parse: none none www.annonse.no none none none
Net-log: ["Opening tcp for" HTTP]
connecting to: www.annonse.no
Net-log: {GET / HTTP/1.0
Accept: */*
Connection: close
User-Agent: REBOL 2.5.0.3.1
Host: go.kvasir.sol.no
}
Net-log: "HTTP/1.1 404 Object Not Found"
** User Error: Error. Target url: http://www.annonse.no/ could not be retriev
ed. Server response: HTTP/1.1 404 Object Not Found
** Near: t: read http://go.kvasir.sol.no/f/http://www.annonse.no/
>>
The first URL I'm asking for will redirect to the second (which is also apparent from
the looks of it). When rebol asks for the second URL, there's a http header bug. It says
host: go.kvasir.sol.no
Since annonse.no is only one of several virtual hosts on a server, it will use the host:
header setting to find the right web page for me. So this results in me getting a 404
error instead of the page I want. (Note: you may try this on other sites with no problem.
On rebol.com, for instance, there is only one website running, so you may put whatever
you want in the host: header field.)
Is this a bug, or am I overlooking something? And if it's a bug, is it a known bug? Does
anyone by any chance have a workaround to share?
~H