Re: [Catalyst] how to confirm before deleting

2009-01-22 Thread Patrick Donelan
On Thu, Jan 22, 2009 at 5:35 PM, Trevor Phillips
wrote:

> On Thu, Jan 22, 2009 at 3:12 PM, Toby Corkindale
>  wrote:
> >
> > But what happens when your site gets spidered by a search engine, that
> > follows all links?
> >
> > Whoops.
> >
> > There's a good reason state-modification-actions should be POST (or
> rather,
> > non-GET, if you want to go with PUT, DELETE, etc)
>
> Surely such an action would be behind some form of authentication,
> ergo blocking any random web crawler? An app that allowed you to
> delete records with no security checks has bigger issues. ^_^


Except, what if the crawler is inside the user's browser? Google's Web
Accelerator supposedly caused a lot of grief in 2005 when it started
pre-fetching non-idempotent GET requests for unsuspecting users..

Patrick Donelan
http://patspam.com
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Tool for rendering web pages consistently though time ?

2009-01-21 Thread Patrick Donelan
Can you be more specific about "time" and "consistent"?

How far into the future are we talking?

Does it have to remain pixel-perfect?

Patrick
http://patspam.com

On Thu, Jan 22, 2009 at 11:29 AM, lanas  wrote:

> Hi,
>
>  I'm looking for a tool/procedure that could render web pages in a
> consistent manner without having to rely on the screen resolution and
> fonts of a workstation so that, through time - and through many OS
> updates of various sorts - it'd be possible to always render the pages
> in the exact same way, for documentation purposes.  Perhaps some kind
> of virtual screen that always uses the same parameters and whose output
> whould be in svg of jpg.
>
>  Is there a way of doing that ?
>
>  Thanls for any ideas/suggestions.
>
> Cheers.
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] [SOT] cat webmail app?

2008-08-15 Thread Patrick Donelan
Not sure if it's what you want but Jesse Vincent showed some cool stuff you
can do with Net::IMAP::Server in his YAPC::Europe talk yesterday, might be
worth checking out.

Patrick

On Thu, Aug 14, 2008 at 3:50 PM, Roderick A. Anderson <[EMAIL PROTECTED]>wrote:

> Kenny Gatdula wrote:
>
>>
>> On Aug 13, 2008, at 3:47 PM, Roderick A. Anderson wrote:
>>
>>>
>>> Where are /we/ on this?  Name: Catmail?  List: exist?  Repo: exist?
>>> irc:exist? Needed: Me? (for more than being an agitator.)
>>>
>>> Jose.  I think I saw a message that you had got some code donated(?).
>>>
>>
>> I sent him a prototype that was oddly enough named Catmail. It's pretty
>> raw, but, it mostly works. It uses Net::IMAP::Simple. you're more than
>> welcome to it.
>>
>
> Thanks Kenny.  Could you send me a copy also?
>
> All: I posted to the Dovecot list yesterday and Timo sent me this link (
> http://imapwiki.org/ClientImplementation) and the main site (
> http://imapwiki.org/) has more information that helps the IMAP naive.
>
>
> Rod
> --
>
>>
>>
>>  All.  I am working on two other projects that will use Catalyst but I've
>>> been away from development (using cat anyway) for quite awhile so I'm liable
>>> to ask some pretty lame questions.
>>>
>>> So does anyone have a preferred module set to deal with IMAP and why? One
>>> of my projects mentioned above uses IMAP and I found there are a lot of
>>> options ... A lot!
>>>
>>> Some seem more complete, several have very cryptic methods, many relied
>>> on a previous knowledge of the supporting modules and the documentation was
>>> lacking or vague.  I think a lot of problems I ran into was my lack of
>>> experience with IMAP as more than a user.
>>>
>>> So enough rambling on.  What next?
>>>
>>>
>>> Rod
>>> --
>>>
>>>
>>> ___
>>> List: Catalyst@lists.scsys.co.uk
>>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>>> Searchable archive:
>>> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
>>> Dev site: http://dev.catalyst.perl.org/
>>>
>>
>>
>> ___
>> List: Catalyst@lists.scsys.co.uk
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive:
>> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
>> Dev site: http://dev.catalyst.perl.org/
>>
>
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Catalyst::*::REST and Javascript

2008-08-15 Thread Patrick Donelan
Hi Robert,

Whereas ExtJS seems to be of form:
>
>userResource = new Resource('http://example.com/users?id=001')
>

ExtJS can send any sort of HTTP request you like - it doesn't really care
how RESTful your URLs are. Like all Ajax toolkits the connectivity portion
of the library is just a glorified wrapper around the browser's XHR object.

Cheers,

Patrick (author of the aforementioned RESTful Web Services article on the
ExtJS wiki)
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Re: RFC: Catalyst::Controller::REST::DBIC

2008-05-05 Thread Patrick Donelan
The only header I've found you can't always set via xhr.setRequestHeader()
is WWW-Authenticate because the browser thinks it should be responsible for
HTTP Authentication. Which is why the last 2 optional arguments to
xhr.open() are username and password, to effectively let you set these
headers (it does the base64 encoding for you too which is handy).

If anyone manages to remember any specific browser limitations or can find
any references please let me know since it would be important for any
RESTful design.

Patrick

On Mon, May 5, 2008 at 9:34 PM, Matt S Trout <[EMAIL PROTECTED]> wrote:

> On Mon, May 05, 2008 at 10:46:56AM +0100, luke saunders wrote:
> > On Mon, May 5, 2008 at 1:20 AM, Patrick Donelan <[EMAIL PROTECTED]> wrote:
> > >
> > > > No, but how you provide an alternative to full RESTness for clients
> that
> > > > don't handle the full range of HTTP verbs -is- a matter for
> discussion.
> > > >
> > >
> > > Which clients are we talking about here? I did a quick google search
> and
> > > could only find an off-hand remark along the lines of "in 2006 safari
> had
> > > poor support for REST verbs". I'm interested because in my own
> personal
> > > experience I haven't run into any problems generating
> PUT/POST/GET/DELETE
> > > with IE/FF/Opera browsers. Or are you talking about the inability to
> specify
> > > anything other than GET or POST as a form method?
> > >
> >
> > I'm afraid I can't remember exactly, it was around two years ago and
> > we needed to fire PUT requests using XHR in JS using Dojo and it just
> > wasn't happening. Dojo has changed dramatically since then and now has
> > an xhrPut method so I expect whatever the problem has been addressed.
>
> Doubt it.
>
> The problem was the browsers gleefully threw out half the headers we were
> trying to send when we used a PUT request. Fuck all dojo can do about that
> so far as I can see.
>
> Of course I forget which browsers and which headers, but it sure as hell
> fucked our shit up but good.
>
> --
>  Matt S Trout   Need help with your Catalyst or DBIx::Class
> project?
>   Technical Director
> http://www.shadowcat.co.uk/catalyst/
>  Shadowcat Systems Ltd.  Want a managed development or deployment
> platform?
> http://chainsawblues.vox.com/
> http://www.shadowcat.co.uk/servers/
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Re: RFC: Catalyst::Controller::REST::DBIC

2008-05-04 Thread Patrick Donelan
>
> No, but how you provide an alternative to full RESTness for clients that
> don't handle the full range of HTTP verbs -is- a matter for discussion.
>

Which clients are we talking about here? I did a quick google search and
could only find an off-hand remark along the lines of "in 2006 safari had
poor support for REST verbs". I'm interested because in my own personal
experience I haven't run into any problems generating PUT/POST/GET/DELETE
with IE/FF/Opera browsers. Or are you talking about the inability to specify
anything other than GET or POST as a form method?

Patrick
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] RFC: Catalyst::Controller::REST::DBIC

2008-05-03 Thread Patrick Donelan
>
> And this gets you the following endpoints to fire requests at:
>/api/rest/cd/create
>/api/rest/cd/id/[cdid]/update
>/api/rest/cd/id/[cdid]/delete
>/api/rest/cd/id/[cdid]/add_to_rel/[relation]
>/api/rest/cd/id/[cdid]/remove_from_rel/[relation]


Those URLs don't strike me as very RESTful.

Patrick
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] RIA on Catalyst

2008-04-10 Thread Patrick Donelan
I recently built a site with Catalyst + ExtJs using Controller::REST. Even
though I didn't have plans to let third-parties access the API, doing it
according to REST increases the chances that you'll end up with a clean,
uniform and (mostly) self-documenting API.

To that end you might find my article in the ExtJs wiki on using Ext to talk
to RESTful Web Services
useful.

Cheers,

Patrick

On Fri, Apr 11, 2008 at 8:10 AM, Robert Krimen <[EMAIL PROTECTED]>
wrote:

> Whatever RIA framework you choose, it will probably work fine with
> Catalyst. I'm using View::JSON for communication back and forth with my
> Ajax-y interface.
>
> Personally, I like using a combination of YUI, jQuery, and Jemplate.
>
> jQuery is a nice glue framework that makes accessing/manipulating the DOM
> really easy.
>
> YUI is a robust framework with *oodles* of documentation and examples. It
> has really nice, high quality widgets (autocomplete, logger, tester, menu)
> and some great .css assets.
> YUI also has a strong focus on cross-browser compatibility.
>
> Jemplate is a great tool for browser-side template rendering. It's
> basically TT (Template Toolkit) for javascript. Instead of rendering html by
> using string concatenation (var el = " all
> that into templates.
>
> The above combination gives a lot of freedom in terms of the look & feel
> of your web application. You can add interactivity to a basic looking web
> page or even implement a complex gmail-ish interface.
>
> As an aside, I've never been much attracted to hoisting a desktop look &
> feel (dialog boxes, lots of windowy widgets) into the browser.
>
> Finally, I've tangled with ExtJS a little bit, but I always feel like I'm
> groping around in the dark with their documentation. There's lots of
> API-type documentation but it could use a ton more .pm-style SYNOPSISes.
>
> Rob
>
> On Thu, Apr 10, 2008 at 10:25 AM, Peter Edwards <[EMAIL PROTECTED]>
> wrote:
>
> >  I've been thinking about how to implement a Rich Internet Application
> > type interface using WSDL and REST data sources including some from a
> > Catalyst base in an SOA style environment.
> >
> > I like Extjs but I've also been looking at Tibo General Interface
> > http://www.tibco.com/devnet/gi/default.jsp
> > which has a good open source tool for generating RIAs
> > http://gi.tibco.com/
> >
> > Anyone used it with/without Catalyst and any comments?
> >
> > Thanks, Peter
> > http://perl.dragonstaff.co.uk
> >
> >
> > ___
> > List: Catalyst@lists.scsys.co.uk
> > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> > Searchable archive:
> > http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> > Dev site: http://dev.catalyst.perl.org/
> >
> >
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Authorization header absent under mod_fcgi

2008-03-11 Thread Patrick Donelan
Hi guys,

The HTTP Authentication Header "Authorization" is absent from
$c->req->headers when running under mod_fastcgi.

In other words, under mod_fastcgi:
 ok(defined $c->req->header('authorization'), 'HTTP Authorization
Header')... fails

Whereas the above test passes under mod_perl.

I've done some searching and it appears the Authorization header gets
stripped out by FastCGI as a "security precaution". The mod_fastcgi
docs (http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html)
indicate that you can disable this behaviour by adding the following
option to the FastCgiServer directive:

  -pass-header header
"The name of an HTTP Request Header to be passed in the request
environment. This option makes available the contents of headers which
are normally not available (e.g. Authorization) to a CGI environment."

However this doesn't seem to work for me (Apache/2.2.3, mod_fastcgi-2.4.6).

The end result is that under mod_fastcgi
Catalyst::Plugin::Authentication::Credential::HTTP doesn't work (and
presumably neither does any other code that tries to do HTTP Basic
Authentication).

Patrick Donelan

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Push services with catalyst

2008-03-10 Thread Patrick Donelan
If you're looking for in-depth discussion of Comet techniques I'd suggest
you have a look at cometdaily.com.

Cheers,

Patrick

On 3/6/08, Moritz Onken <[EMAIL PROTECTED]> wrote:
>
> But I still need a lot of code which is run by catalyst, like
> authentication and of course the whole dbic schema.
> What about Catalyst::Engine::HTTP::POE?
>
> cometd.com is not very informative ...
>
> Am 05.03.2008 um 23:47 schrieb Peter Edwards:
>
>
> > Jay wrote:
> >> On Wed, Mar 5, 2008 at 11:48 AM, Moritz Onken
> >> <[EMAIL PROTECTED]>
> > wrote:
> >>> I'm combining ajax with push. So it's a real push service, the
> >>> website
> >>> is not pulling the data on a constant time rate.
> >>>
> >>> A process per client is really bad. I'll need to serve hundreds of
> >>> client at the same time. Seems like push is not an option...
> >>>
> >>
> >> Take a look at cometd: http://cometd.com/
> >
> > Thanks for mentioning that, it looks interesting, particularly as it's
> > hooked up to perlbal.
> >
> > Moritz, I've done something similar before using POE to handle many
> > connections more cheaply than Apache (thanks to Matt Trout for the
> > suggestion). It was to serve XML formatted requests though you could
> > return
> > JSON formatted data just as easily
> > http://search.cpan.org/perldoc?POE::Component::Server::TCP
> >
> > Regards, Peter
> > http://perl.dragonstaff.co.uk
> >
> >
> > ___
> > List: Catalyst@lists.scsys.co.uk
> > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> > Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> > Dev site: http://dev.catalyst.perl.org/
>
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/