8000 Fix for download > 10mb issue with Content-Length: 0 being sent before by jasonprogrammer · Pull Request #253 · dom96/jester · GitHub
[go: up one dir, main page]

Skip to content

Conversation

jasonprogrammer
Copy link

Content-Length header with file size

Copy link
Owner
@dom96 dom96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC you need to modify statusContent as doing this will fail for the asynchttpserver target (you can test by compiling with -d:useStdlib (again, if my memory is correct :)).

@jasonprogrammer
Copy link
Author
jasonprogrammer commented Jul 4, 2020

I just tried compiling with -d:useStdlib, and you are correct (it hangs). :(

The problem is, calling statusContent calls send which ends up sending the undesired Content-Length: 0 header. It seems like there are multiple ways to fix this:

  1. Use a when to detect when httpbeast/threads will be used, and if so, use the line in this PR.
  2. Modify httpbeast to somehow not send the Content-Length: 0 when statusContent->send->send is called.

@dom96
Copy link
Owner
dom96 commented Jul 5, 2020

statusContent is implemented in jester, right? Why not use unsafeSend there (for httpbeast only)?

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

Successfully merging this pull request may close these issues.

2 participants
0