-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double content length #11
Comments
Thanks for the report. Do you notice this behaviour in |
Switching to the Digging a bit deeper, it turns out that Elli sets the Content-Length header itself: https://github.com/elli-lib/elli/blob/develop/src/elli_http.erl#L187 So I guess the bug is that this middleware even deals with this stuff at all. Elli seems to read all info it needs from the file again, so doing it in this middleware seems redundant. |
One idea: since this middleware has licensing issues (#9), perhaps a rewrite is in order? I could see if creating a new |
👍 to that. I'll set up a skeleton repo and add you. It'll mostly likely be tomorrow. If I forget, feel free to ping me. |
I'd like to polish and incorporate |
@yurrriq Incorporating cache sounds good. So we should depend on that middleware as well? Because I can see that the |
I have a simple version of |
Right, the idea behind |
I get double Content-Length headers when using the
master
branch. E.g.:Tracing shows this result:
If I debug using the
request_complete
event as follows:I get the following output:
Here I only see the headers set by
elli_fileserve
but somewhere aContent-Length: 0
header is added (and the response transformed to a 206 Partial Content as well.This is the configuration and supervisor:
Not sure if this is a bug in
elli_fileserve
or Elli itself.The text was updated successfully, but these errors were encountered: