Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Upload file bug with oauth signing was fixed #174

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions rauth/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ def request(self,
url = self._set_url(url)

entity_method = method.upper() in ENTITY_METHODS
if entity_method:
req_kwargs['headers'].setdefault('Content-Type', FORM_URLENCODED)
if entity_method and 'files' not in req_kwargs or \
req_kwargs['files'] is None:
req_kwargs['headers'].setdefault('Content-Type', FORM_URLENCODED)

form_urlencoded = \
req_kwargs['headers'].get('Content-Type') == FORM_URLENCODED
Expand Down