We have an application that cares about the order of cookie headers. It shouldn't, since this isn't mandated by the standards and indeed we're getting the headers in various different orders
So we would like to rewrite the headers in Apache so that the cookie headers always appear in a specific order. Is there any way of doing this?
An ideal solution would be specifically about cookie headers, but something that lets us mess with the header order more generally would do too.
HTTP headers aren't guaranteed to arrive in any particular order, and you shouldn't require them to be. If the cookies are order-sensitive, add an incrementing serial number to the beginning of each one, and reassemble them in your application.