c - How to use ap_parse_form_data and keep request body? -


"postprint" itemprop = "text">

I'm developing some authentication display for Apache before passing a request to a module backend. At this time some authentication form data needs to be parsed. The problem is that the request body is removed from the ap_parse_form_data , so long as it passes through my module and goes to the ProxyPass instruction that closes the backend , The request body has gone and the backend believes that no form data has been given.

Is there a way to use the ap_parse_form_data to retain the request code like this? ap_parse_form_data I was able to get the same effect by manually adding a request body manually Was:

  apr_bucket_brigade * new_brigade = apr_brigade_create (req-> pool, req-> connection & gt; bucket_alloc); Apr_bucket * Bucket = apr_bucket_transient_create (reencoded_form_data, strlen (reencoded_form_data), req-> Connection-> Batty_loc); APR_BRIGADE_INSERT_TAIL (new_brigade, bucket); Req-> Kept_body = new_brigade;  

This is not ideal because this request does not deal with the cancellation of the side effect of the body if ap_parse_form_data is called on a request body which is actually Does not include form data but it works just enough for my purposes ...


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -