Loading ...
Sorry, an error occurred while loading the content.

Re: When is session-id injected into URLs?

Expand Messages
  • Joshua Chamas
    ... If you look at the Apache::ASP::Response::Flush routine, you will find that Script_OnFlush gets called BEFORE these ASP Flush() fixup actions: XSLT
    Message 1 of 2 , Apr 27, 2002
    • 0 Attachment
      eamondaly wrote:
      >
      > I'm trying to add a cleaner to Script_OnFlush so that our pages
      > will validate properly at http://validator.w3.org/:
      >
      > sub Script_OnFlush {
      > my $data = $Response->{BinaryRef};
      >
      > # This is experimental. Allows our docs to validate HTML 4.01 by
      > # converting '&' to '&' in hrefs.
      >
      > $$data =~ s{href=["']([^"']+?)["']}{ my $url = $1;
      > $url =~ s/&/&/g;
      > qq{href="$url"}
      > }sgie;
      > }
      >

      If you look at the Apache::ASP::Response::Flush routine, you will
      find that Script_OnFlush gets called BEFORE these ASP Flush()
      fixup actions:

      XSLT
      FormFill
      Clean
      SessionQueryParse
      CompressGzip
      SendHeaders
      --- write output ---

      While, having it run before is fairly arbitrary, it seems to make
      sense that all of the above actions would happen after Script_OnFlush()
      so they could also work on your Script_OnFlush output. What you want
      is the final event after the above translations ( well before Clean
      and CompressGzip I imagine. ) We might call this:

      sub Script_OnFlushFixup()

      so the order would be:

      Script_OnFlush()
      XSLT
      FormFill
      SessionQueryParse
      Script_OnFlushFixup() ***
      Clean
      CompressGzip
      SendHeaders
      --- write output ---

      What it sounds like you really want though is for
      SessionQueryParse to handle & "correctly" and have it
      auto escape & to & ... my only concern with this
      is I do not know the browser compability issues with
      this if there are any... do ALL browsers treat &
      in URLs correctly as & when the URLs are in HTML
      tag attributes? I know some browsers do, but I am
      concerned with the prospect of changing the behavior
      for what seems to work fine already.

      -- Josh
      _________________________________________________________________
      Joshua Chamas Chamas Enterprises Inc.
      NodeWorks Founder Huntington Beach, CA USA
      http://www.nodeworks.com 1-714-625-4051

      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    Your message has been successfully submitted and would be delivered to recipients shortly.