Description: fix mod_session header manipulation
Origin: upstream, https://svn.apache.org/viewvc?view=revision&revision=1824477

Index: apache2-2.4.7/modules/session/mod_session.c
===================================================================
--- apache2-2.4.7.orig/modules/session/mod_session.c	2018-04-18 11:13:12.166553828 -0400
+++ apache2-2.4.7/modules/session/mod_session.c	2018-04-18 11:13:12.154553804 -0400
@@ -505,12 +505,15 @@ static int session_fixups(request_rec *
      */
     ap_session_load(r, &z);
 
-    if (z && conf->env) {
-        session_identity_encode(r, z);
-        if (z->encoded) {
-            apr_table_set(r->subprocess_env, HTTP_SESSION, z->encoded);
-            z->encoded = NULL;
+    if (conf->env) {
+        if (z) {
+            session_identity_encode(r, z);
+            if (z->encoded) {
+                apr_table_set(r->subprocess_env, HTTP_SESSION, z->encoded);
+                z->encoded = NULL;
+            }
         }
+        apr_table_unset(r->headers_in, "Session");
     }
 
     return OK;
