the headers and values for userid, myvariable1, myvariable12, aren't reaching the target page https://mymachine.mydomain.com/search.do. So that pages reports the values as null.
I'd like to know why.
From the Fiddler traces, we see the header passed to the back end server on a POST action. But the server replies with return code 301 to make the URL https instead of http. This redirection is culprit of the lost of the header values.
You should take note of the following. If you POST header to a page, the next redirected page won't get these headers. Only the page you POST to will have.
Apache 301 Redirect and preserving post data
"POST data is discarded on redirect as a client will perform a GET request to the URL specified by the 301. Period."