Drew Taylor wrote:
On Thu, 21 Oct 2004 12:44:12 -0400, Michael <[EMAIL PROTECTED]> wrote:

Here is the initial documentation from an idea I'm playing with and
wanted to get some feedback on. I've attached the code to this message
as well...

  HTTP Headers
        * Cookies
            HTTP headers (and hence HTTP cookies) are now not created with
            "header_add()" or "header_props()". Instead use Apache::Cookie
            for cookies and anything you want for additional header
            manipulation.

        * Redirects
            This also means that the "$self->header_type('redirect')"
            doesn't currently do anything. Instead you should use
            "$self->query->internal_redirect($some_url)" for external
            redirects and use something like

                $self->query->header_out(Location => $some_url);
                $self->query->status(REDIRECT);


First, I really like the idea. A client of mine is a recent convert to
CGI::App but would really like to use Apache::Request. This makes it
very easy to do.

A couple comments: Is there any reason you can't provide overridden
header_*() method which Do The Right Thing under the hood? This would
make it trivial to switch between use of CGI & Apache::Request.  I
know that it's probably not practical to have 100% API compatibility,
but covering the header method would go a long way.

ok, I've been thinking about how to approach solving this and thought I would ask others for some ideas.


First, header_props and header_add just use _header_props_update, so that's where the magic needs to go. The problem is that they pass those props straight into CGI.pm's header and redirect method. CGI allows a lot of different types of arguments so I'd rather not have to take all of those args, parse them and then try to figure out what they wanted to do. But I guess that's an option.

It shouldn't be that bad for redirect since it should only be '-uri' => $some_url (and of course all of it's variants).

Any ideas would greatly be appreciated.


-- Michael Peters Developer Plus Three, LP


--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to