File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main/resources/python
python-disallowAdditionalPropertiesIfNotPresent/openapi_client
python-aiohttp/petstore_api
python-httpx-sync/petstore_api
python-httpx/petstore_api
python-lazyImports/petstore_api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -684,8 +684,8 @@ class ApiClient:
684684 headers['Cookie'] = ""
685685 else:
686686 headers['Cookie'] += "; "
687- # Account for cookie value containing spaces or being non-string value
688- cookie_value = quote( str(auth_setting['value']), safe='' )
687+ # Encode spaces and semicolons in cookie value, leaving other characters as-is
688+ cookie_value = str(auth_setting['value']).replace(" ", "%20").replace(";", "%3B" )
689689 headers['Cookie'] += f"{ auth_setting[' key' ]} ={ cookie_value} "
690690 elif auth_setting['in'] == 'header':
691691 if auth_setting['type'] != 'http-signature':
Original file line number Diff line number Diff line change @@ -677,8 +677,8 @@ def _apply_auth_params(
677677 headers ['Cookie' ] = ""
678678 else :
679679 headers ['Cookie' ] += "; "
680- # Account for cookie value containing spaces or being non-string value
681- cookie_value = quote ( str (auth_setting ['value' ]), safe = '' )
680+ # Encode spaces and semicolons in cookie value, leaving other characters as-is
681+ cookie_value = str (auth_setting ['value' ]). replace ( " " , "%20" ). replace ( ";" , "%3B" )
682682 headers ['Cookie' ] += f"{ auth_setting ['key' ]} ={ cookie_value } "
683683 elif auth_setting ['in' ] == 'header' :
684684 if auth_setting ['type' ] != 'http-signature' :
Original file line number Diff line number Diff line change @@ -677,8 +677,8 @@ def _apply_auth_params(
677677 headers ['Cookie' ] = ""
678678 else :
679679 headers ['Cookie' ] += "; "
680- # Account for cookie value containing spaces or being non-string value
681- cookie_value = quote ( str (auth_setting ['value' ]), safe = '' )
680+ # Encode spaces and semicolons in cookie value, leaving other characters as-is
681+ cookie_value = str (auth_setting ['value' ]). replace ( " " , "%20" ). replace ( ";" , "%3B" )
682682 headers ['Cookie' ] += f"{ auth_setting ['key' ]} ={ cookie_value } "
683683 elif auth_setting ['in' ] == 'header' :
684684 if auth_setting ['type' ] != 'http-signature' :
Original file line number Diff line number Diff line change @@ -679,8 +679,8 @@ def _apply_auth_params(
679679 headers ['Cookie' ] = ""
680680 else :
681681 headers ['Cookie' ] += "; "
682- # Account for cookie value containing spaces or being non-string value
683- cookie_value = quote ( str (auth_setting ['value' ]), safe = '' )
682+ # Encode spaces and semicolons in cookie value, leaving other characters as-is
683+ cookie_value = str (auth_setting ['value' ]). replace ( " " , "%20" ). replace ( ";" , "%3B" )
684684 headers ['Cookie' ] += f"{ auth_setting ['key' ]} ={ cookie_value } "
685685 elif auth_setting ['in' ] == 'header' :
686686 if auth_setting ['type' ] != 'http-signature' :
Original file line number Diff line number Diff line change @@ -679,8 +679,8 @@ def _apply_auth_params(
679679 headers ['Cookie' ] = ""
680680 else :
681681 headers ['Cookie' ] += "; "
682- # Account for cookie value containing spaces or being non-string value
683- cookie_value = quote ( str (auth_setting ['value' ]), safe = '' )
682+ # Encode spaces and semicolons in cookie value, leaving other characters as-is
683+ cookie_value = str (auth_setting ['value' ]). replace ( " " , "%20" ). replace ( ";" , "%3B" )
684684 headers ['Cookie' ] += f"{ auth_setting ['key' ]} ={ cookie_value } "
685685 elif auth_setting ['in' ] == 'header' :
686686 if auth_setting ['type' ] != 'http-signature' :
Original file line number Diff line number Diff line change @@ -679,8 +679,8 @@ def _apply_auth_params(
679679 headers ['Cookie' ] = ""
680680 else :
681681 headers ['Cookie' ] += "; "
682- # Account for cookie value containing spaces or being non-string value
683- cookie_value = quote ( str (auth_setting ['value' ]), safe = '' )
682+ # Encode spaces and semicolons in cookie value, leaving other characters as-is
683+ cookie_value = str (auth_setting ['value' ]). replace ( " " , "%20" ). replace ( ";" , "%3B" )
684684 headers ['Cookie' ] += f"{ auth_setting ['key' ]} ={ cookie_value } "
685685 elif auth_setting ['in' ] == 'header' :
686686 if auth_setting ['type' ] != 'http-signature' :
Original file line number Diff line number Diff line change @@ -676,8 +676,8 @@ def _apply_auth_params(
676676 headers ['Cookie' ] = ""
677677 else :
678678 headers ['Cookie' ] += "; "
679- # Account for cookie value containing spaces or being non-string value
680- cookie_value = quote ( str (auth_setting ['value' ]), safe = '' )
679+ # Encode spaces and semicolons in cookie value, leaving other characters as-is
680+ cookie_value = str (auth_setting ['value' ]). replace ( " " , "%20" ). replace ( ";" , "%3B" )
681681 headers ['Cookie' ] += f"{ auth_setting ['key' ]} ={ cookie_value } "
682682 elif auth_setting ['in' ] == 'header' :
683683 if auth_setting ['type' ] != 'http-signature' :
Original file line number Diff line number Diff line change @@ -676,8 +676,8 @@ def _apply_auth_params(
676676 headers ['Cookie' ] = ""
677677 else :
678678 headers ['Cookie' ] += "; "
679- # Account for cookie value containing spaces or being non-string value
680- cookie_value = quote ( str (auth_setting ['value' ]), safe = '' )
679+ # Encode spaces and semicolons in cookie value, leaving other characters as-is
680+ cookie_value = str (auth_setting ['value' ]). replace ( " " , "%20" ). replace ( ";" , "%3B" )
681681 headers ['Cookie' ] += f"{ auth_setting ['key' ]} ={ cookie_value } "
682682 elif auth_setting ['in' ] == 'header' :
683683 if auth_setting ['type' ] != 'http-signature' :
You can’t perform that action at this time.
0 commit comments