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

TCK multipart not set as request parameter #9066

Closed
janbartel opened this issue Dec 19, 2022 · 3 comments
Closed

TCK multipart not set as request parameter #9066

janbartel opened this issue Dec 19, 2022 · 3 comments
Assignees
Labels
Bug For general bugs on Jetty side TCK For various Specification Test Compatibility Kits (eg: Servlet, WebSocket, HTTP/2, etc)

Comments

@janbartel
Copy link
Contributor

jetty-12

According to the spec, pg 28 Section 3.2 File Upload:

For parts with form-data as the Content-Disposition, but without a filename, the string value of the
part will also be available through the getParameter and getParameterValues methods on
HttpServletRequest, using the name of the part.

The TCK tests that such a part is available as a parameter value by sending Content-Disposition: form-data; name="xyz" with content 1234567abcdefg, and in the TestServlet doing:

   response.setContentType("text/html");

    // Do getParameter first, to test if it works if getParts not called.
    out.write("getParameter(\"xyz\"): " + request.getParameter("xyz"));
    out.write("\n\n");

We fail this test because we do not parse the parts until Request.getPart(String) is called.

Moreover, once we do parse the parts, we do not set the request parameter.

See https://github.com/jakartaee/platform-tck/blob/master/src/com/sun/ts/tests/servlet/api/jakarta_servlet_http/part/URLClient.java#L85
and https://github.com/jakartaee/platform-tck/blob/master/src/com/sun/ts/tests/servlet/api/jakarta_servlet_http/part/TestServlet.java#L42

@janbartel janbartel added the Bug For general bugs on Jetty side label Dec 19, 2022
@janbartel janbartel moved this to To do in Jetty 12.0.ALPHAS Dec 19, 2022
@janbartel janbartel added TCK For various Specification Test Compatibility Kits (eg: Servlet, WebSocket, HTTP/2, etc) Jetty 12 labels Dec 19, 2022
@gregw
Copy link
Contributor

gregw commented Dec 21, 2022

When we test this, can we make sure any fix works with and without the DelayedHandler

@joakime
Copy link
Contributor

joakime commented Dec 21, 2022

There was a question on the jakartaee/servlet that seems related ...

lachlan-roberts added a commit that referenced this issue Feb 2, 2023
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
@gregw gregw moved this to 🏗 In progress in Jetty 12.0.0.beta0 - FROZEN Feb 2, 2023
@lachlan-roberts
Copy link
Contributor

fixed as part of PR #9287

@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Jetty 12.0.0.beta0 - FROZEN Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side TCK For various Specification Test Compatibility Kits (eg: Servlet, WebSocket, HTTP/2, etc)
Projects
None yet
Development

No branches or pull requests

4 participants