I'm afraid this one is tough. Here it goes.
I do requests to my local Apache with fsockopen(). In my page with URL http://myhost/folder1/ I have a link of form: <a href="/folder2/">. Then the strange things appear. When I do HTTP request in form "GET /folder1/ HTTP/1.0", everything is OK. But if I request the page as "GET http://myhost/folder1/ HTTP/1.0", that link I mentioned is replaced with "<a href="/folder2http://myhost/folder1/">.
As I believe it affects only links that point from /folder1/ to /folder2/ (probably, vice versa, too), and not even all of them.
When outputting, I really do NO processing of the data except htmlspecialchars(), so it can't be a stupid bug of mine.
Apache 1.3.22 Win98
PHP 4.2.3 as CGI