-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Routing] allow HEAD method to be defined first #23618
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fabpot
approved these changes
Jul 22, 2017
Thank you @DavidBadura. |
fabpot
added a commit
that referenced
this pull request
Jul 22, 2017
This PR was merged into the 3.3 branch. Discussion ---------- [Routing] allow HEAD method to be defined first | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Since 3.3 it's no longer possible to set the allowed methods to HEAD followed by GET. If you try this you get an `Notice: Undefined offset: 0` error. ``` index: path: '/' defaults: _controller: AppBundle:Default:index methods: [HEAD, GET] ``` It works perfectly if you change the ordering of the allowed methods: ``` index: path: '/' defaults: _controller: AppBundle:Default:index methods: [GET, HEAD] ``` The problem has been added in this commit: dd647ff#diff-3b72491a9ba1cff58442b845ae837eb3R297 After an `array_filter` the keys will not be reset. So the key `0` does not exist anymore and this check `if ('$methods[0]' !== \$$methodVariable) {` fails. A simple `array_values` fix this issue. Commits ------- 52e2821 Router: allow HEAD method to be defined first
Merged
---------- Forwarded message ----------
From: "John Johnson" <notifications@github.com<mailto:notifications@github.com>>
Date: Aug 21, 2017 9:41 PM
Subject: [getsentry/sentry] NoClassDefFoundError java.nio.file.Path (#5939)
To: "getsentry/sentry" <sentry@noreply.github.com<mailto:sentry@noreply.github.com>>
Cc: "Subscribed" <subscribed@noreply.github.com<mailto:subscribed@noreply.github.com>>
Sentry Android Version: 1.5.0
When I call Sentry.capture("This is a test") I get the following error and stacktrace.
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/nio/file/Path;
at io.sentry.marshaller.json.SentryJsonGenerator.writeObject(SentryJsonGenerator.java:75)
at io.sentry.marshaller.json.SentryJsonGenerator.writeObject(SentryJsonGenerator.java:60)
at com.fasterxml.jackson.core.JsonGenerator.writeObjectField(JsonGenerator.java:1662)
at io.sentry.marshaller.json.JsonMarshaller.writeContexts(JsonMarshaller.java:317)
at io.sentry.marshaller.json.JsonMarshaller.writeContent(JsonMarshaller.java:195)
at io.sentry.marshaller.json.JsonMarshaller.marshall(JsonMarshaller.java:157)
at io.sentry.connection.HttpConnection.doSend(HttpConnection.java:155)
at io.sentry.connection.AbstractConnection.send(AbstractConnection.java:71)
at io.sentry.connection.BufferedConnection.send(BufferedConnection.java:102)
at io.sentry.connection.AsyncConnection$EventSubmitter.run(AsyncConnection.java:171)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Possibly relevant configuration
compileSdkVersion 25
buildToolsVersion '26'
defaultConfig {
minSdkVersion 17
targetSdkVersion 25
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<getsentry/sentry#5939>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AOXMGJIid4AWxT2MJA-7b56KNyx5wkiAks5sajHJgaJpZM4O-Ash>.
|
Go home GitHub your drunk... 🍺 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since 3.3 it's no longer possible to set the allowed methods to HEAD followed by GET. If you try this you get an
Notice: Undefined offset: 0
error.It works perfectly if you change the ordering of the allowed methods:
The problem has been added in this commit: dd647ff#diff-3b72491a9ba1cff58442b845ae837eb3R297
After an
array_filter
the keys will not be reset. So the key0
does not exist anymore and this checkif ('$methods[0]' !== \$$methodVariable) {
fails. A simplearray_values
fix this issue.