-
Notifications
You must be signed in to change notification settings - Fork 49
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
curl: (56) Malformed encoding found in chunked-encoding #98
Comments
I found the problem. It's a one-line fix so I'll just post it here. In I guess this is a bug in Emacs C source code. (Edit: this behaviour is actually documented. See here and here, "if the string contains multibyte characters, this is not necessarily Demonstration, using this file
TL;DR: |
Unicode characters will cause this problem. On Tue, Jul 14, 2015 at 8:44 PM, Ruben Maher notifications@github.com
|
Right. Not sure what elnode should do. Automatically convert? (how would we send bytes?) or make it clear that it's not really a string... it's a string of bytes? |
Unless I've completely misunderstood something (wouldn't be the first time), there's no conversion necessary? The problem is just that size of the chunk reported in the header ( |
I think that's option 2, accept that send-string is sending bytes, not strings. Either way it needs to change, but it could be either way. |
I think it should send the number of bytes. On Wed, Jul 15, 2015 at 10:29 AM, Nic Ferrier notifications@github.com
|
What's the status on this? I just ran into this issue in 2017. |
@jiri It's been a long time, but IIRC you need to monkeypatch Edit: or you can just use the |
Thanks! I've been looking into making a patch for this, but there already is a pull request. It would be nice if @nicferrier either accepted it or appointed a maintainer of the package. I think That being said, the issue seems to have disappeared as I have not been able to replicate it since I restarted Emacs. If it ever surfaces, I'll bump this issue again :) |
Some
.org
files fail to render in any browser when served byelnode
. These files export without error, and the rendered html can be validated using http://validator.w3.org/. Onlycurl
gives a clue about malformed encoding. It might just be thatelnode
is doing such a good job of being asynchronous that it tries to write data before it is available.Tested on Emacs 24.4.1 with Org-mode 8.2.10 and
elnode-0.9.9.8.8
, also on Emacs 24.5.1 with Org-mode 8.2.10 andelnode-0.9.9.8.8
(same behaviour for both).How to reproduce (from
emacs -Q
):elnode
somewhere. I temporarily moved myemacs.d
and installed from marmalade.~/dotemacs/emacs.org
is cloned from https://github.com/bzg/dotemacs (arbitrary large and public org file).Try to access in the terminal emulator:
You will see something like the following in
*elnode-server-error*
buffer:I see the same behaviour using this, and some of my own files that I don't want to share just yet.
Expected behaviour: same for that of smaller org files. Here's an example
~/test.org
that I used:Re-evaluate
my-test-handler
, changing the argument toorg2html
:Try to access in a terminal emulator:
No problem. It renders correctly in a web browser.
*elnode-server-error*
now shows:The text was updated successfully, but these errors were encountered: