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

Update lib/incoming_form.js #163

Closed
wants to merge 1 commit into from
Closed

Update lib/incoming_form.js #163

wants to merge 1 commit into from

Conversation

jesperp
Copy link
Contributor

@jesperp jesperp commented Aug 21, 2012

bug with content-disposition when name comes after filename. E.g:

attachment; filename="test/x.png"; name="files[]" 

This will set part.name to "test/x.png" instead of files[] because the regex to search for "name=" matches filename= first. The order of name/filename should not matter to the user :)
Solution is simple, add a \b (word boundary) to regex for name/filename..

bug with content-disposition when name comes after filename. This is due to regex for name matches "filename" too..
@jesperp
Copy link
Contributor Author

jesperp commented Aug 22, 2012

that "name=" regex is not on purpose right? Looks like there is another package taking advantage of this. This test assumes just sending in filename will also set name correspondingly in res.files...

@Jellyfrog
Copy link

@jesperp Any news?

egirshov added a commit to egirshov/node-formidable that referenced this pull request Feb 6, 2013
svnlto added a commit that referenced this pull request Feb 7, 2013
@egirshov egirshov closed this Feb 7, 2013
@jesperp
Copy link
Contributor Author

jesperp commented Feb 19, 2013

Sorry @Jellyfrog I've been away for a while so haven't looked into this, but looks like @egirshov finalized it. Thanks egirshov!

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

Successfully merging this pull request may close these issues.

None yet

3 participants