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

No way of getting getdata on a POST controller accepting multipart data #80

Closed
0chroma opened this issue Aug 3, 2011 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@0chroma
Copy link

0chroma commented Aug 3, 2011

Let's say I had the following code in a ScalatraFilter:

post("/someUrl/") {
  val someProp = request.getParamter("someParam")
  "<h1>"+someProp+"</h1>"
}

If this was used within a ScalatraFilter with FileUploadSupport, someProp would be null if the POST data was multipart, even if the 'someParam' parameter was set in the querystring contained in the URL. I'm not sure if this is consistent with the servlet API, but I can see the parameter show up if I use request.getQueryString, so I feel like it would be accessible. Either way, I feel like there should be some way of getting getdata in these sorts of conditions, mainly due to the inflexible nature of many client-side file uploading libraries (mainly flash uploaders, passing a CSRF key while using them can be pretty tricky).

@rossabaker
Copy link
Member

I can also reproduce this with ScalatraServlet with FileUploadSupport. This is likely a regression from #16.

@ghost ghost assigned rossabaker Aug 3, 2011
@0chroma
Copy link
Author

0chroma commented Aug 3, 2011

Wow, that was fast. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants