tags:

views:

30

answers:

1

Hey folks,

I an trying to do the following -

1) Access POST submission data in Apache 2) Create a file name by using some of the parameters in POST data from 1)

I will like to then read the file from disk vs using back-end application to regenerate the page.

Any help will be greatly appreciated.

+1  A: 

Your methodology is fundamentally flawed.

A POST should only be used where you want to change the state of the server. If you're serving up a cached file instead then you're not changing the state.

If generating the content after the POST can be cached, then the way to implement this would be to return a 302/303/307 header in the POST target pointing to the page which should be rendered (and can be cached).

C.

symcbean
Even if I do a 302 in Rails framework by looking at request.raw_post to a GET url, how will Apache construct a url path next time request comes in? This is needed in order to bypass the Rails framework.
? Apache doesn't construct URLs - your code, the browser and the user do that. There may be shortcomings in RoR which prevent you from applying a practical solution - but I'm not familiar with Ruby at all (and you never said this was a question about RoR). If you're asking how you implement the cache storage - its up to you if you use mod_proxy, implement it in your own code or put a reverse proxy in front of the webserver.
symcbean