Skip to content

Commit 55c5085

Browse files
committed
chore: try tomcat again
1 parent 3b3ba57 commit 55c5085

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

backend/pom.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,17 @@
122122
<dependency>
123123
<groupId>org.springframework.boot</groupId>
124124
<artifactId>spring-boot-starter-web</artifactId>
125-
<exclusions>
126-
<exclusion>
127-
<groupId>org.springframework.boot</groupId>
128-
<artifactId>spring-boot-starter-tomcat</artifactId>
129-
</exclusion>
130-
</exclusions>
131-
</dependency>
132-
<dependency>
133-
<groupId>org.springframework.boot</groupId>
134-
<artifactId>spring-boot-starter-undertow</artifactId>
135-
</dependency>
125+
<!-- <exclusions> -->
126+
<!-- <exclusion> -->
127+
<!-- <groupId>org.springframework.boot</groupId> -->
128+
<!-- <artifactId>spring-boot-starter-tomcat</artifactId> -->
129+
<!-- </exclusion> -->
130+
<!-- </exclusions> -->
131+
</dependency>
132+
<!-- <dependency> -->
133+
<!-- <groupId>org.springframework.boot</groupId> -->
134+
<!-- <artifactId>spring-boot-starter-undertow</artifactId> -->
135+
<!-- </dependency> -->
136136
<dependency>
137137
<groupId>org.springframework.boot</groupId>
138138
<artifactId>spring-boot-starter-cache</artifactId>

backend/src/main/java/io/papermc/hangar/exceptions/handlers/HangarExceptionHandler.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import io.papermc.hangar.exceptions.HangarApiException;
55
import io.papermc.hangar.exceptions.HangarResponseException;
66
import io.papermc.hangar.exceptions.MultiHangarApiException;
7-
import io.undertow.server.RequestTooBigException;
8-
import io.undertow.server.handlers.form.MultiPartParserDefinition;
7+
//import io.undertow.server.RequestTooBigException;
8+
//import io.undertow.server.handlers.form.MultiPartParserDefinition;
99
import jakarta.servlet.http.HttpServletRequest;
1010
import java.util.Optional;
1111
import org.jetbrains.annotations.NotNull;
@@ -85,17 +85,17 @@ protected ResponseEntity<Object> handleExceptionInternal(final @NotNull Exceptio
8585
return new ResponseEntity<>(ex, headers, status);
8686
}
8787

88-
@ExceptionHandler(MultiPartParserDefinition.FileTooLargeException.class)
89-
public ResponseEntity<HangarApiException> handleException(final MultiPartParserDefinition.FileTooLargeException exception) {
90-
final HangarApiException apiException = new HangarApiException(HttpStatus.PAYLOAD_TOO_LARGE, "File too large - files have to be less than " + this.config.projects().maxFileSizeMB() + "MB in size");
91-
return new ResponseEntity<>(apiException, HttpStatus.PAYLOAD_TOO_LARGE);
92-
}
93-
94-
@ExceptionHandler(RequestTooBigException.class)
95-
public ResponseEntity<HangarApiException> handleException(final RequestTooBigException exception) {
96-
final HangarApiException apiException = new HangarApiException(HttpStatus.PAYLOAD_TOO_LARGE, "File too large - files have to be less than " + this.config.projects().maxTotalFilesSizeMB() + "MB total");
97-
return new ResponseEntity<>(apiException, HttpStatus.PAYLOAD_TOO_LARGE);
98-
}
88+
//@ExceptionHandler(MultiPartParserDefinition.FileTooLargeException.class)
89+
//public ResponseEntity<HangarApiException> handleException(final MultiPartParserDefinition.FileTooLargeException exception) {
90+
// final HangarApiException apiException = new HangarApiException(HttpStatus.PAYLOAD_TOO_LARGE, "File too large - files have to be less than " + this.config.projects().maxFileSizeMB() + "MB in size");
91+
// return new ResponseEntity<>(apiException, HttpStatus.PAYLOAD_TOO_LARGE);
92+
//}
93+
//
94+
//@ExceptionHandler(RequestTooBigException.class)
95+
//public ResponseEntity<HangarApiException> handleException(final RequestTooBigException exception) {
96+
// final HangarApiException apiException = new HangarApiException(HttpStatus.PAYLOAD_TOO_LARGE, "File too large - files have to be less than " + this.config.projects().maxTotalFilesSizeMB() + "MB total");
97+
// return new ResponseEntity<>(apiException, HttpStatus.PAYLOAD_TOO_LARGE);
98+
//}
9999

100100
@Override
101101
protected ResponseEntity<Object> handleMaxUploadSizeExceededException(final @NotNull MaxUploadSizeExceededException ex, final @NotNull HttpHeaders headers, final @NotNull HttpStatusCode status, final @NotNull WebRequest request) {

0 commit comments

Comments
 (0)