Skip to content

Commit

Permalink
Reverted to using the get_content_typ() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohe committed Dec 6, 2024
1 parent 757ac61 commit 12b3f47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 53 deletions.
49 changes: 0 additions & 49 deletions edu_federation/get_info.py

This file was deleted.

9 changes: 5 additions & 4 deletions src/fedservice/entity/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from idpyoidc.client.service_context import CLI_REG_MAP
from idpyoidc.client.service_context import PROVIDER_INFO_MAP
from idpyoidc.client.util import do_add_ons
from idpyoidc.client.util import get_content_type
from idpyoidc.client.util import get_deserialization_method
from idpyoidc.exception import FormatError
from idpyoidc.exception import ParseError
Expand Down Expand Up @@ -426,8 +427,8 @@ def parse_request_response(self, service, reqresp, response_body_type="", state=

if reqresp.status_code in SUCCESSFUL:
logger.debug('response_body_type: "{}"'.format(response_body_type))
ctype = reqresp.headers.get("content-type")
_deser_method = get_deserialization_method(reqresp)
ctype = get_content_type(reqresp)
_deser_method = get_deserialization_method(ctype)

if _deser_method != response_body_type:
logger.warning(
Expand Down Expand Up @@ -455,8 +456,8 @@ def parse_request_response(self, service, reqresp, response_body_type="", state=
elif 400 <= reqresp.status_code < 500:
logger.error("Error response ({}): {}".format(reqresp.status_code, reqresp.text))
# expecting an error response
ctype = reqresp.headers.get("content-type")
_deser_method = get_deserialization_method(reqresp)
ctype = get_content_type(reqresp)
_deser_method = get_deserialization_method(ctype)
if not _deser_method:
_deser_method = "json"

Expand Down

0 comments on commit 12b3f47

Please sign in to comment.