abhishek-ram / django-pyas2

AS2 file transfer Server built on Python and Django.
https://django-pyas2.readthedocs.io
GNU General Public License v3.0
83 stars 31 forks source link

Unsupported Media Type error for application/octet-stream #74

Closed Arun-V-S closed 2 years ago

Arun-V-S commented 2 years ago

Attaching the trace that gives unsupported media type when tried to send message to partner.

Failed to send message, error: Traceback (most recent call last): File "/django_pyas2/pyas2/models.py", line 480, in send_message response.raise_for_status() File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 960, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 415 Client Error: Unsupported Media Type for url: https://:/file

Partner Host (non PyAS2 internal AS2 Application) expects Content-Type to be "application/octet-stream". So, selected "binary" option in the Content-Type to send message. But ended up with the above mentioned error - Unsupported media type.

@abhishek-ram Can you please help resolving this?

Arun-V-S commented 2 years ago

We fixed this by updating the URL. Thanks.