[1.6] Redirect bugs?

View: New views
3 Messages — Rating Filter:   Alert me  

[1.6] Redirect bugs?

by Chris Croome :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

There seem to be a odd redirect bug with the latest CVS version of MKDoc
1.6, for example if you add a photo attachment to the front page of a
site, and then go to view the scaled version then you get a redirect
loop and an address like this (this is truncated):

  /photo.jpg%2Chtml/photo.jpg%2Cscaled/photo.jpg-html/photo.jpg-scaled/photo.jpg-html/

Another way to trigger the bug is to edit the front page and then save
it, you get redirected to a 404:

  /.admin.content/

It appears that something is adding an extra / onto URLs?

This could be an issue caused by using Apache 1.3.34 -- but there is
nothing in the list of changes from version 1.3.33 that appears to be
behind this...

Or perhaps the latest Mozilla / Firefox browsers are munging the URLs --
they seem to be escaping "," to "%2C" which they didn't do before (this is
on Fedora Core 5) but IE 6 also seems to escape "," so perhaps it's
apache doing this rather than the clients...

I'll try to do some debugging to see if I can track this down further...

Chris

--
Chris Croome                               <chris@...>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/   
_______________________________________________
MKDoc-dev mailing list
MKDoc-dev@...
https://lists.webarch.co.uk/mailman/listinfo/mkdoc-dev

Re: [1.6] Redirect bugs?

by Chris Croome :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

On Wed 05-Apr-2006 at 05:52:23PM +0100, Chris Croome wrote:
>
> This could be an issue caused by using Apache 1.3.34

Doesn't appear to be -- I have switched to 1.3.33 and there is still
this odd behavior, for example:

  lynx -head -dump "http://www.fc5.webarchitects.co.uk:8080//photo.jpg,html"
  HTTP/1.1 302 Moved
  Date: Thu, 06 Apr 2006 10:23:18 GMT
  Server: Apache/1.3.33 (Unix) mod_perl/1.29
  Location: http://www.fc5.webarchitects.co.uk:8080/photo.jpg%2Chtml
  Connection: close
  Content-Type: text/plain

The server is redirecting to a page with an escaped "," -- this isn't a
client issue.

But note the // in the request address above, if the request is made
without out it then the "," isn't escaped:

   lynx -head -dump "http://www.fc5.webarchitects.co.uk:8080/photo.jpg,html"
   HTTP/1.1 200 OK
   Date: Thu, 06 Apr 2006 10:26:14 GMT
   Server: Apache/1.3.33 (Unix) mod_perl/1.29
   Connection: close
   Content-Type: text/html; charset=UTF-8

So this appears to be a template bug, but the templates haven't changed
-- this is the code that generates the link on the front page of the
site:

  <a href="#" title="Photo Title"
     petal:attributes="href self/uri_html; title self/title" >

But this is the generated HTML:

  <a href="http://www.fc5.webarchitects.co.uk:8080//photo.jpg,html"
     title="Photo">
                 
So perhaps the way that self/uri_html is generated has changed?

Another odd thing is the link to the home page on the /photo.jpg,html
page -- this is the generated HTML:

  <a hreflang="en" xml:lang="en" dir="ltr"
     href="http://www.fc5.webarchitects.co.uk:8080/photo.jpg%2Chtml/"
     lang="en">Root document</a>

Which is clearly wrong. This code is generated from the same breadcrumb
trail MKDoc template as is used everwhere... and there is the same
problem on the sitemap page -- this is the breadcrumb trail link to the
front page:

  <a hreflang="en" xml:lang="en" dir="ltr"
     href="http://www.fc5.webarchitects.co.uk:8080/.sitemap.html/"
     lang="en">Root document</a>

What is odd is that I'm only getting this with a brand new install on a
new FC5 server -- old installs don't seem to have this problem. I have
looked at the environment settings and there doesn't seem to be anything
wrong but the env or perhaps one of the perl modules that MKDoc depends
on might be causing this problem...?

Chris

--
Chris Croome                               <chris@...>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/   
_______________________________________________
MKDoc-dev mailing list
MKDoc-dev@...
https://lists.webarch.co.uk/mailman/listinfo/mkdoc-dev

[SOLVED] MKDoc requires CGI.pm 3.11 or earlier, was: Re: [1.6] Redirect bugs?

by Chris Croome :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

On Thu 06-Apr-2006 at 10:56:23AM +0100, Chris Croome wrote:
>
> What is odd is that I'm only getting this with a brand new install on
> a new FC5 server -- old installs don't seem to have this problem. I
> have looked at the environment settings and there doesn't seem to be
> anything wrong but the env or perhaps one of the perl modules that
> MKDoc depends on might be causing this problem...?

I thought it might be down to CGI.pm, these changes seem like they could
have perhaps broken MKDoc:

  Version 3.13

      1. Removed extraneous empty "?" from end of self_url().

  Version 3.12

      7. The url() and self_url() methods now work better in the context
         of Apache mod_rewrite. Be advised that path_info() may give you
         confusing results when mod_rewrite is active because Apache
         calculates the path info *after* rewriting.  This is mostly
         worked around in url() and self_url(), but you may notice some
         anomalies.

  Version 3.11

     3. Workaround for a bug that appears in Apache2 versions through
        2.0.54 in which SCRIPT_NAME and PATH_INFO are incorrect if the
        additional path_info contains a double slash. This workaround
        will handle the common case of
        http://mysite.com/cgi-bin/log.cgi/http://www.some.other.site/args,
        but will not handle the uncommon case of a ScriptAlias directive
        that adds additional path information to the end of the
        translated URI.

  http://search.cpan.org/src/LDS/CGI.pm-3.17/Changes

And after installing a old version of CGI.pm (3.10) everything starts to
work again :-)

It is also OK with 3.11, with 3.12 it breaks as described earlier in this
thread and the extra "?" is appended to URLs.

It is also broken with all later versions.

So -- MKDoc requires CGI.pm 3.11 or earlier.

Chris

--
Chris Croome                               <chris@...>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/   
_______________________________________________
MKDoc-dev mailing list
MKDoc-dev@...
https://lists.webarch.co.uk/mailman/listinfo/mkdoc-dev