Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prism Proxy is not working as expected for binary content types image/jpeg and application/pdf #2475

Closed
Nagasures opened this issue Mar 14, 2024 · 3 comments

Comments

@Nagasures
Copy link

Nagasures commented Mar 14, 2024

Response code receiving as 500 when prism proxy is running where as same request is working when sent to actual live end point URL. Issue is occurring when request sent to prism proxy URL

Context

unable to implement prism for my team of 10 members

Current Behavior

Prism proxy forwards the request to base server but we receive response with code 500. Same request sends to actual base/live URL instead of proxy URL sends me 200 code.

Expected Behavior

Prism proxy should work as live server

Steps to Reproduce

paths
    /anything
       post:
           requestBody:
               content:
                 image/jpeg
                    schema:
                       type: string
                       format : binary
                  application/pdf
                    schema:
                       type: string
                       format : binary
  1. File is being uploaded as binary ( not form-data)
  2. uploading content types image/jpeg , application/pdf

Environment

Latest version of prism : 5.5.4

Files being uploaded from windows 10 into Linux docker container

@Nagasures
Copy link
Author

When request message is received at Proxy URL ... as a next step Proxy is forwarding the request to Live URL. However format of the file is being modified by Proxy causing the 500 response code.

@brendarearden
Copy link
Contributor

https://docs.stoplight.io/docs/prism/1593d1470e4df-concepts#content-negotiation this content type is not currently supported in prism. We are tracking this enhancement / feature here: #2349 and will close yours as duplicate.

@Nagasures
Copy link
Author

Thank you for support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants