Skip to content
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

OpenWrap2 fails to properly parse index.wraplist with "Transfer-Encoding: chunked" #344

Open
ancow opened this issue Oct 4, 2012 · 1 comment

Comments

@ancow
Copy link

ancow commented Oct 4, 2012

If I try to use a wraplist larger than 8000 bytes, OW2 completely ignores it. list-wrap says the corresponding repository is empty.

Edit: Some further study has shown that my Apache2 sends files this "large" with the "Transfer-Encoding: chunked" header. OW2 seems unable to handle this (probably because the content length isn't set in this context.

ancow added a commit to ancow/openwrap that referenced this issue Oct 10, 2012
- fix issue OpenWrap#344 by not simply ignoring "Transfer-Encoding: chunked" answers and making ProgressStream able to handle streams where the total isn't known beforehand
@ancow
Copy link
Author

ancow commented Oct 10, 2012

It turns out that in C#, the content length is set to "-1" if it isn't specified. According to the HTTP/1.1 specification, not specifying content-length when transfer-encoding is set to "chunked" is valid behaviour, so the above commit checks for its presence and extends ProgressStream to support having an unknown final length.
This solution works for me (tested in conjunction with the invalid SSL certificate) on a remote server running Apache.

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

No branches or pull requests

1 participant