2

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.

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.

| 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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