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

Check Content-Type in RequestAdapter before assuming multipart #156

Closed
wants to merge 1 commit into from

Conversation

jfrazee
Copy link

@jfrazee jfrazee commented Jul 18, 2014

This addresses #154

@jfrazee
Copy link
Author

jfrazee commented Jul 18, 2014

Sorry there aren't any tests yet. Wanted to get your eyes on this quickly. Can add tests this weekend.

As far as I can tell, #154 is a show stopper for anyone posting JSON.

request.multiParams = MultipartParsing(request)
request.contentType match {
case Some(c) if !c.matches("""(?i)^multipart\/form-data.*""") =>
case _ =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The match with a regex seems like overkill here, perhaps just have a simple if condition with request.contentType.contains("multipart/form-data")

@capotej
Copy link
Contributor

capotej commented Oct 15, 2014

Sorry for the delay in looking at this; Add a test and I'll merge this. Thanks!

@davydkov
Copy link
Contributor

@jfrazee Could you check, probably this one #168 already fixed it

@jfrazee
Copy link
Author

jfrazee commented Oct 15, 2014

@beenokle @capotej #168 fixes the issue and is cleaner so I'm closing this.

@jfrazee jfrazee closed this Oct 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants