Skip to content

Commit

Permalink
fix: get Header.ContentType not working
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioPinheiro committed Sep 4, 2023
1 parent 347e769 commit 4cf2685
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,17 @@ object MediatorAgent {

} yield (ret)
case req @ Method.POST -> Root
if req
.header(Header.ContentType)
if req.headers
// .header(Header.ContentType) // TODO BUG? this does not work
.get("content-type")
.exists { h =>
h.mediaType.mainType == "application" &&
(h.mediaType.subType == "didcomm-signed+json" || h.mediaType.subType == "didcomm-encrypted+json")
// FIXME
// TODO after fix BUG
// h.mediaType.mainType == "application" &&
// (h.mediaType.subType == "didcomm-signed+json" || h.mediaType.subType == "didcomm-encrypted+json")
// TODO after update lib
// h.mediaType.mainType == ZMediaTypes.mainType &&
// (h.mediaType.subType == MediaTypes.SIGNED.subType || h.mediaType.subType == MediaTypes.ENCRYPTED.subType)
h == MediaTypes.SIGNED.typ || h == MediaTypes.ENCRYPTED.typ
} =>
for {
agent <- ZIO.service[MediatorAgent]
Expand Down

0 comments on commit 4cf2685

Please sign in to comment.