Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Error : Bad Request - when uploading filename with unescaped chars #717

Closed
jfroffice opened this Issue · 5 comments

4 participants

@jfroffice

Strange thing, when I upload file called PaulC%E9zanne.jpg,

I get this callstack :

at SendStream.error (/app/node_modules/express/node_modules/send/lib/send.js:145:16)
at SendStream.pipe (/app/node_modules/express/node_modules/send/lib/send.js:298:31)
at Object.static (/app/node_modules/express/node_modules/connect/lib/middleware/static.js:83:8)
at next (/app/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Object.cookieSession [as handle] (/app/node_modules/express/node_modules/connect/lib/middleware/cookieSession.js:113:5)
at next (/app/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Object.cookieParser [as handle] (/app/node_modules/express/node_modules/connect/lib/middleware/cookieParser.js:60:5)
at next (/app/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at Object.methodOverride [as handle] (/app/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js:37:5)
at next (/app/node_modules/express/node_modules/connect/lib/proto.js:190:15)
@flippyhead

I've been seeing this too.

@dougwilson dougwilson was assigned
@dougwilson
Owner

This stack trace is from serving a file, not uploading a file. What is the name of the file on the file system? If it is PaulC%E9zanne.jpg then your HTTP request must be for PaulC%25E9zanne.jpg (note the original % is encoded).

@dougwilson dougwilson closed this
@rlidwka

He obviously wanted to upload a file named "PaulCézanne.jpg" to the server. I'm not sure what server should do in this case, maybe rename it or something.

@jfroffice

Thank you for your reply,

Actually I use Express Js with Formidable api for upload

I remarked that file name with any caracter %XX cause a crash on server side.

Maybe it has been fixed since 11 months.

I can not reproduce the problem now.

@dougwilson
Owner

In that time, connect also stopped using formidable and started using multiparty which also could have been what fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.