Skip to content
This repository was archived by the owner on May 28, 2018. It is now read-only.

Commit def86cc

Browse files
fkrauthan-hyperwalletpavelbucek
authored andcommitted
Fixed formdata media type detection for oauth-server1
Change-Id: Icb6fc1d31a8475a510cd3c74dd70bdf539a3d2be
1 parent 3a56c85 commit def86cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

security/oauth1-server/src/main/java/org/glassfish/jersey/server/oauth1/internal/OAuthServerRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
import javax.ws.rs.core.MediaType;
5656
import javax.ws.rs.core.MultivaluedMap;
5757

58+
import org.glassfish.jersey.message.internal.MediaTypes;
5859
import org.glassfish.jersey.internal.util.collection.Value;
5960
import org.glassfish.jersey.internal.util.collection.Values;
6061
import org.glassfish.jersey.oauth1.signature.OAuth1Request;
@@ -80,7 +81,7 @@ public class OAuthServerRequest implements OAuth1Request {
8081
public MultivaluedMap<String, String> get() {
8182
MultivaluedMap<String, String> params = null;
8283
final MediaType mediaType = context.getMediaType();
83-
if (mediaType != null && mediaType.equals(MediaType.APPLICATION_FORM_URLENCODED_TYPE)) {
84+
if (mediaType != null && MediaTypes.typeEqual(mediaType, MediaType.APPLICATION_FORM_URLENCODED_TYPE)) {
8485
final ContainerRequest jerseyRequest = (ContainerRequest) context;
8586
jerseyRequest.bufferEntity();
8687
final Form form = jerseyRequest.readEntity(Form.class);

0 commit comments

Comments
 (0)