Skip to content

org.eclipse.jetty.server.Request uses wrong context attribute name javax.servlet instead of jakarta.servlet #10731

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

Closed
mreiterer opened this issue Oct 13, 2023 · 1 comment
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@mreiterer
Copy link

mreiterer commented Oct 13, 2023

Jetty version(s)
11.0.17

Jetty Environment

Java version/vendor (use: java -version)
openjdk 17.0.4.1 2022-08-12
OpenJDK Runtime Environment Temurin-17.0.4.1+1 (build 17.0.4.1+1)
OpenJDK 64-Bit Server VM Temurin-17.0.4.1+1 (build 17.0.4.1+1, mixed mode)

OS type/version
MacOS Ventur a13.4.1 (c) (22F770820d)

Description
org.eclipse.jetty.server.Request uses wrong context attribute name in method:

private MultiParts newMultiParts(MultipartConfigElement config, int maxParts) throws IOException

Uses: "javax.servlet.context.tempdir"
Should be: "jakarta.servlet.context.tempdir"

Should use constant: jakarta.servlet.ServletContext.TEMPDIR

How to reproduce?

@mreiterer mreiterer added the Bug For general bugs on Jetty side label Oct 13, 2023
@olamy olamy self-assigned this Oct 14, 2023
olamy added a commit that referenced this issue Oct 14, 2023
olamy added a commit that referenced this issue Oct 16, 2023
…karta.servlet (#10735)

* Issue #10731 wrong context attribute name javax.servlet instead of jakarta.servlet

Signed-off-by: Olivier Lamy <[email protected]>

* Update jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java

Co-authored-by: Simone Bordet <[email protected]>

* Update jetty-server/src/main/java/org/eclipse/jetty/server/Request.java

Co-authored-by: Simone Bordet <[email protected]>

* fix javadoc

Signed-off-by: Olivier Lamy <[email protected]>

* more usage of constant

Signed-off-by: Olivier Lamy <[email protected]>

---------

Signed-off-by: Olivier Lamy <[email protected]>
Co-authored-by: Simone Bordet <[email protected]>
@olamy
Copy link
Member

olamy commented Oct 16, 2023

done

@olamy olamy closed this as completed Oct 16, 2023
olamy added a commit that referenced this issue Oct 17, 2023
…karta.servlet (#10735)

* Issue #10731 wrong context attribute name javax.servlet instead of jakarta.servlet

Signed-off-by: Olivier Lamy <[email protected]>

* Update jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java

Co-authored-by: Simone Bordet <[email protected]>

* Update jetty-server/src/main/java/org/eclipse/jetty/server/Request.java

Co-authored-by: Simone Bordet <[email protected]>

* fix javadoc

Signed-off-by: Olivier Lamy <[email protected]>

* more usage of constant

Signed-off-by: Olivier Lamy <[email protected]>

---------

Signed-off-by: Olivier Lamy <[email protected]>
Co-authored-by: Simone Bordet <[email protected]>
olamy added a commit that referenced this issue Oct 17, 2023
…t instead of jakarta.servlet (#10735) and Address build/test failure against bad entities. (#10742) (#10745)

* Issue #10731 wrong context attribute name javax.servlet instead of jakarta.servlet (#10735)

* Issue #10731 wrong context attribute name javax.servlet instead of jakarta.servlet

Signed-off-by: Olivier Lamy <[email protected]>

* Update jetty-server/src/main/java/org/eclipse/jetty/server/MultiPartFormInputStream.java

Co-authored-by: Simone Bordet <[email protected]>

* Update jetty-server/src/main/java/org/eclipse/jetty/server/Request.java

Co-authored-by: Simone Bordet <[email protected]>

* fix javadoc

Signed-off-by: Olivier Lamy <[email protected]>

* more usage of constant

Signed-off-by: Olivier Lamy <[email protected]>

---------

Signed-off-by: Olivier Lamy <[email protected]>
Co-authored-by: Simone Bordet <[email protected]>

* Address build/test failure against bad entities. (#10742)

Bad entities in test case can lead to:

* external URL references
* required HTTP GET requests
* not testing redirectEntity / resolveEntity
  (the whole point of the test)

Signed-off-by: Joakim Erdfelt <[email protected]>

* use constant

Signed-off-by: Olivier Lamy <[email protected]>

---------

Signed-off-by: Olivier Lamy <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Co-authored-by: Simone Bordet <[email protected]>
Co-authored-by: Joakim Erdfelt <[email protected]>
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
Projects
No open projects
Status: ✅ Done
Development

No branches or pull requests

2 participants