Maybe APR:: Core API?

http://perl.apache.org/docs/2.0/api/index.html





jper...@inview.co.uk 
21/01/2010 10:31

A
mason-users@lists.sourceforge.net
cc

Objet
Re: [Mason] Direct access to the request content






Hi Joe/Hans/MK.

Thanks for the suggestion of building my own server, but I strongly 
disagree with the idea that HTTP/Apache/etc. is the wrong solution for me.

On the contrary, I'm building a site that will serve pages in an 
XML-derived format, and that will require those pages to be constructed 
on-the-fly from programmatic components mixing XML and (perl?) code in 
some sort of template mechanism. Pages will contain references to assets 
such as images that come in a variety of content types (some stored as 
static files and some need to be generated on-the-fly), and will contain 
links to other pages. I'll need facilities such as cookies, session 
management, and a TLS-secured version of the protocol for certain pages. 
And I'll need it all served up by a tried-and-tested server implementation 
that is robust and can be scaled to cope with tens of millions of clients.

In other words, what I'm doing is *exactly* what HTTP, Apache, mod_perl & 
Mason were designed for. None of those technologies care that my pages 
aren't in HTML format, or even that for efficiency I want a handful of my 
pages to receive unmodified serialised binary from my client platform as a 
non-standard HTTP request body. It's still standard HTTP and if I designed 
my own protocol instead it would have to look very much like HTTP.

Would anyone like to answer my original question, rather than questioning 
my motives:

What's the best way to access the raw request body content from within a 
Mason component?

Cheers, Jon.


-----Original Message-----
From: Joe Pepersack [mailto:j...@pepersack.net] 
Sent: 20 January 2010 14:45
To: Jon Perkin
Cc: mason-users@lists.sourceforge.net
Subject: Re: [Mason] Direct access to the request content

The obvious question (to me) is if you're not making standard HTTP
requests and not serving HTML, why use Apache at all?  You might be better
off writing your own custom server.

Refer to chapters 17 and 18 of the Perl Cookbook (especially example
17.5), as well as example 19.6 in chapter 19.

> Hi all.
>
> I'm working on a rather unusual web site in that the client software 
isn't
> actually a web browser and doesn't understand HTML!  I'm planning to use
> Mason on Apache2/mod_perl2, which I've used on other projects with great
> success.
>
> However, the client will be making requests to the server with
> non-standard request bodies, so I'd like to know what is the best way in
> Mason on mod_perl2 to access the raw content of the request. It isn't
> obvious to me from either Mason or mod_perl2 documentation.
>
> I'm currently using CGI.pm, but could change to using Apache2::Request 
if
> needed.
>
> Cheers, Jon.
>
> 
------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for
> Conference
> attendees to learn about information security's most important issues
> through
> interactions with peers, luminaries and emerging and established
> companies.
> 
http://p.sf.net/sfu/rsaconf-dev2dev_______________________________________________

> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users
>



------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for 
Conference
attendees to learn about information security's most important issues 
through
interactions with peers, luminaries and emerging and established 
companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à 
l'intention exclusive des destinataires et les informations qui y figurent sont 
strictement confidentielles. Toute utilisation de ce Message non conforme à sa 
destination, toute diffusion ou toute publication totale ou partielle, est 
interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le 
copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si 
vous avez reçu ce Message par erreur, merci de le supprimer de votre système, 
ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support 
que ce soit. Nous vous remercions également d'en avertir immédiatement 
l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie 
électronique arrivent en temps utile, sont sécurisées ou dénuées de toute 
erreur ou virus.
____________________________________________________

This message and any attachments (the 'Message') are intended solely for the 
addressees. The information contained in this Message is confidential. Any use 
of information contained in this Message not in accord with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited except 
formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any 
part of it. If you have received this message in error, please delete it and 
all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or 
virus-free.
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to