Re: [BUG] wwwoffle misinterprets # symbol in 'Location' header

amb-Uxr6IM1mbv2TY6FTCsQk+9Bc4/[email protected] (Andrew M. Bishop)
Newsgroups gmane.network.wwwoffle.user
Message-ID <[email protected]>
Max Kirillov <max630-JGs/[email protected]> writes:

> Version: 2.8e-2-max-1 (regular debian build with my little patch about
> fetch/autodial)
> 
> When the remote host respond with:
> 
> HTTP/1.1 302
> Location: <URL>#<fragment>
> 
> and wwwofle performs the 'wwwofle -fetch' command,
> it recursively requests document <URL>%23<fragment> instead of <URL>
> 
> Steps to reproduce:
> 1. Create a file file1.php on remote server with PHP
> <?php
> header("Location: http://wwwoffle-test.net/file2.html#a1");
> exit;
> ?>
> You can use a local apache and name localhost somehow in /etc/hosts to
> cheat wwwoffle.
> 2. request the file through the wwwoffle via any browser.
> 3. $wwwoffle -online
> 4. $wwwoffle -fetch

Your bug report has the wrong name.  It should be "PHP allows illegal
'Location' header".

It is not defined in HTTP specification to have a header with a
fragment identifier.  Actually to be honest the only mention of the
word fragment is the sentence "The URI MUST NOT include a fragment."
for a Referer header.  The HTTP protocol does not handle fragment
identifiers anywhere, it is only browsers that understand what they
are and they are only valid for HTML type documents.

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             amb-Uxr6IM1mbv2TY6FTCsQk+9Bc4/[email protected]
                                      http://www.gedanken.demon.co.uk/

WWWOFFLE users page:
        http://www.gedanken.demon.co.uk/wwwoffle/version-2.8/user.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.