Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm running Apache in front of glassfish server using BalancerMember.

For performance reasons I would like that POST requests on certain endpoint are just saved to a file without passing them to application (and to return correct HTTP return code).

How to configure Apache to do that?

EDIT: In other words, if a POST request is for path http://example.com/upload then the content of the post (body) should go into a file.

share|improve this question

1 Answer 1

What do you mean by specific POST requests. Does your application have some kind of API. Are there parameters in the POST request which you can filter for? If so you may need to do this in your application. For every request that comes in run it through a filter then save the POST requests you want return the status code and allow others to pass.

share|improve this answer
    
Actually, the POST requests I want to catch are all from the same end point. I don't care about header, cookies, etc. Just payload needs to be save into a file. –  Robert Grezan Dec 19 '12 at 10:01
1  
I would code that into your application, maybe some kind of redirect from .htaccess based on the IP making the requests and forward it to a php file to save the data. –  Anagio Dec 19 '12 at 10:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.