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

Parsing fails if filename contains UTF-8 characters #20

Closed
avidenie opened this Issue Dec 10, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@avidenie

avidenie commented Dec 10, 2013

Steps to reproduce:

  1. Install and start the server

    • mkdir test
    • cd test
    • npm install busboy
    • vim server.js <= paste the example from the readme.md
    • node server.js
  2. Perform an upload using a file with ASCII characters

curl -v -F 'id=123' -F "file=@test.mp4;type=video/mp4" http://localhost:8000

In console, you get this:

File [file]: filename: test.mp4, encoding: 7bit
File [file] got 65305 bytes
Field [id]: value: '123'
File [file] got 65536 bytes
[...]
File [file] Finished
Done parsing form!

Curl call finishes correctly:

< HTTP/1.1 100 Continue
< HTTP/1.1 303 See Other
< Connection: close
< Location: /
< Date: Tue, 10 Dec 2013 09:21:15 GMT
< Transfer-Encoding: chunked

  1. Perform an upload using a file with UTF-8 characters

cp test.mp4 お疲れ様です.mp4
curl -v -F 'id=123' -F "file=@お疲れ様です.mp4;type=video/mp4" http://localhost:8000

In console, you get this:

Field [id]: value: '123'

Curl call will eventually timeout:

< HTTP/1.1 100 Continue

  • Recv failure: Connection reset by peer
  • Closing connection 0
@mscdex

This comment has been minimized.

Show comment
Hide comment
@mscdex

mscdex Dec 10, 2013

Owner

I'm confused, both of your curl statements are the same. Where is the utf-8 filename?

Owner

mscdex commented Dec 10, 2013

I'm confused, both of your curl statements are the same. Where is the utf-8 filename?

@avidenie

This comment has been minimized.

Show comment
Hide comment
@avidenie

avidenie Dec 10, 2013

Yeah, sorry about that, I've updated the report.

avidenie commented Dec 10, 2013

Yeah, sorry about that, I've updated the report.

@mscdex

This comment has been minimized.

Show comment
Hide comment
@mscdex

mscdex Dec 12, 2013

Owner

Ok, this should be fixed in master now. Can you give it a try?

Owner

mscdex commented Dec 12, 2013

Ok, this should be fixed in master now. Can you give it a try?

@avidenie

This comment has been minimized.

Show comment
Hide comment
@avidenie

avidenie Dec 12, 2013

It seems to be working fine now, thank you very much.

avidenie commented Dec 12, 2013

It seems to be working fine now, thank you very much.

@avidenie avidenie closed this Dec 12, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment