cleanup session comments (#1470)

This commit is contained in:
oblomov-dev 2024-10-01 19:25:20 +02:00 committed by GitHub
parent 018970a54d
commit e0cb6990f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -184,27 +184,17 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION.
"transform cookie to header based contextid handling "transform cookie to header based contextid handling
IF attributes-stateful-switched = abap_true. IF attributes-stateful-switched = abap_true.
* server->set_session_stateful( stateful = attributes-stateful-active ).
mo_server->set_session_stateful( attributes-stateful-active ). mo_server->set_session_stateful( attributes-stateful-active ).
IF mo_server->get_header_field( 'sap-contextid-accept' ) = 'header'. IF mo_server->get_header_field( 'sap-contextid-accept' ) = 'header'.
* server->response->get_cookie(
* EXPORTING
* name = 'sap-contextid'
* IMPORTING
* value = DATA(lv_contextid) ).
DATA(lv_contextid) = mo_server->get_response_cookie( 'sap-contextid' ). DATA(lv_contextid) = mo_server->get_response_cookie( 'sap-contextid' ).
IF lv_contextid IS NOT INITIAL. IF lv_contextid IS NOT INITIAL.
* server->response->delete_cookie( 'sap-contextid' ).
mo_server->delete_response_cookie( 'sap-contextid' ). mo_server->delete_response_cookie( 'sap-contextid' ).
* server->response->set_header_field( name = 'sap-contextid' value = lv_contextid ).
mo_server->set_header_field( n = 'sap-contextid' v = lv_contextid ). mo_server->set_header_field( n = 'sap-contextid' v = lv_contextid ).
ENDIF. ENDIF.
ENDIF. ENDIF.
ELSE. ELSE.
* lv_contextid = server->request->get_header_field( 'sap-contextid' ).
lv_contextid = mo_server->get_header_field( 'sap-contextid' ). lv_contextid = mo_server->get_header_field( 'sap-contextid' ).
IF lv_contextid IS NOT INITIAL. IF lv_contextid IS NOT INITIAL.
* server->response->set_header_field( name = 'sap-contextid' value = lv_contextid ).
mo_server->set_header_field( n = 'sap-contextid' v = lv_contextid ). mo_server->set_header_field( n = 'sap-contextid' v = lv_contextid ).
ENDIF. ENDIF.
ENDIF. ENDIF.