Commit c0ca20c
committed
fix(assets): replace() use save/restore for Content-Type header
_api_client._call_request merges self.headers into every request via
headers.update(self.headers), which overwrites any per-request copy
before the request is sent. The only effective way to suppress
Content-Type for multipart uploads is to temporarily pop it from the
shared dict and restore it in a finally block.
Also retains the with-open() fix so the file handle is always closed
after the request.1 parent 4c64ba7 commit c0ca20c
1 file changed
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
182 | 188 | | |
183 | 189 | | |
184 | 190 | | |
| |||
0 commit comments