fastcgi-client-rs icon indicating copy to clipboard operation
fastcgi-client-rs copied to clipboard

Add ability to custom insertion in Params

Open DmitryHudrich opened this issue 1 year ago • 3 comments

This commit introduces a custom method for inserting parameters into PHP-FPM requests. This was necessary because the general methods for parameter insertion might not include required parameters, such as HTTP_HOST, which is crucial for WordPress to function properly. The custom approach ensures that all necessary parameters are provided for correct operation.

DmitryHudrich avatar Jan 03 '25 12:01 DmitryHudrich

But Params implement DerefMut of HashMap, so you can use insert mehtod Inherited from HashMap.

jmjoy avatar Jan 04 '25 06:01 jmjoy

Oh, sorry for my carelessness. insert works. But DerefMut requires a mutable variable. I think this is a bit inconsistent with the fact that the parameters are specified through a Builder.

DmitryHudrich avatar Jan 04 '25 10:01 DmitryHudrich

What's wrong with mutable variables?

jmjoy avatar Jan 06 '25 02:01 jmjoy