Skip to content

Commit

Permalink
The error 'Parse Error: Invalid character in chunk size' occurs becau…
Browse files Browse the repository at this point in the history
…se both response.content_length and 'Transfer-Encoding': 'chunked' are being set in the server response. This creates a conflict, as Transfer-Encoding: chunked does not require a Content-Length. By removing response.content_length = len(image_data), this conflict is avoided, and the error is resolved.
  • Loading branch information
urbanoprogramador committed Dec 19, 2024
1 parent 49d1588 commit eb33597
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion navigator/actions/zammad.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ async def get_attachment_img(self, attachment: str, request: Request):
'Expires': expiring_date.strftime('%a, %d %b %Y %H:%M:%S GMT'),
}
)
response.content_length = len(image_data)
await response.prepare(request)
await response.write(image_data)
await response.write_eof()
Expand Down

0 comments on commit eb33597

Please sign in to comment.