-
Notifications
You must be signed in to change notification settings - Fork 35
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
Update naming for status codes 413 and 422 #87
Update naming for status codes 413 and 422 #87
Conversation
Are there any tests maintained for the legacy status codes? We need to prove that users can still respond with old status code variant. |
http-core/src/main/java/org/apache/pekko/http/javadsl/model/StatusCodes.java
Outdated
Show resolved
Hide resolved
Nice addition, thanks @Philippus. Is that something we would consider for 1.0.0? There's little risk but currently I'd say let's postpone to 1.1.x on principle since it is not strictly necessary right now? |
Agreed, milestone set |
@Philippus Apologies but my javafmt commit caused some merge conflicts on this PR but they are relatively minor. If you do a rebase on Let me know if you have time/are able to do this, otherwise I can just fix it up before merging the PR. |
there is no hurry on this as we are unlikely to include this in the pekko-http 1.0.0 release (and add it later instead) |
Indeed take your time, its not urgent |
I'll fix it up once the first pekko-http is out of the door. |
@Philippus You need rebase your PR. |
3ff3fa4
to
0c5361d
Compare
http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/StatusCode.scala
Outdated
Show resolved
Hide resolved
0c5361d
to
5f334dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies - I was going around approving PRs but I forgot about the Scala 3 compile issue in this PR - hopefully, we;ll get around to fixing that soon
Was about to say that the tests are failing with |
This is only an API change and for those changes we mostly rely on Mima to catch problems. We also have the (currently disabled) "http-compatibility-tests" module which has logic to test backward compatibility in cases which warrant more testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs the below fixes to fix the runtime errors.
http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/StatusCode.scala
Outdated
Show resolved
Hide resolved
http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/StatusCode.scala
Outdated
Show resolved
Hide resolved
608f524
to
b67169b
Compare
http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/StatusCode.scala
Outdated
Show resolved
Hide resolved
37274b3
to
3e5e8ea
Compare
public static final StatusCode CONTENT_TOO_LARGE = | ||
org.apache.pekko.http.scaladsl.model.StatusCodes.ContentTooLarge(); | ||
|
||
/** @deprecated deprecated in favor of CONTENT_TOO_LARGE since 1.0.0 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be since 1.1.0
- 1.0.0 was released without this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 good point
http-core/src/main/scala/org/apache/pekko/http/scaladsl/model/StatusCode.scala
Outdated
Show resolved
Hide resolved
(btw. test error is likely unrelated) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
3e5e8ea
to
0bf6079
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks again, @Philippus! |
I think the naming changed in RFC 9110, see https://www.rfc-editor.org/rfc/rfc9110.html#name-413-content-too-large and https://www.rfc-editor.org/rfc/rfc9110.html#name-422-unprocessable-content.