Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9335e09

Browse files
smowtonowen-mc
authored andcommitted
MIME type -> content type
This matches the terminology used elsewhere
1 parent 5f7165e commit 9335e09

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

java/ql/src/semmle/code/java/frameworks/JaxWS.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,19 +255,19 @@ class MessageBodyReaderRead extends Method {
255255
}
256256
}
257257

258-
/** An `@Produces` annotation that describes which MIME types can be produced by this resource. */
258+
/** An `@Produces` annotation that describes which content types can be produced by this resource. */
259259
class JaxRSProducesAnnotation extends JaxRSAnnotation {
260260
JaxRSProducesAnnotation() { getType().hasQualifiedName("javax.ws.rs", "Produces") }
261261

262262
/**
263-
* Gets a declared MIME type that can be produced by this resource.
263+
* Gets a declared content type that can be produced by this resource.
264264
*/
265-
string getADeclaredMimeType() {
265+
string getADeclaredContentType() {
266266
result = getAValue().(CompileTimeConstantExpr).getStringValue()
267267
or
268268
exists(Field jaxMediaType |
269269
// Accesses to static fields on `MediaType` class do not have constant strings in the database
270-
// so convert the field name to a mime type string
270+
// so convert the field name to a content type string
271271
jaxMediaType.getDeclaringType().hasQualifiedName("javax.ws.rs.core", "MediaType") and
272272
jaxMediaType.getAnAccess() = getAValue() and
273273
// e.g. MediaType.TEXT_PLAIN => text/plain
@@ -276,7 +276,7 @@ class JaxRSProducesAnnotation extends JaxRSAnnotation {
276276
}
277277
}
278278

279-
/** An `@Consumes` annotation that describes MIME types can be consumed by this resource. */
279+
/** An `@Consumes` annotation that describes content types can be consumed by this resource. */
280280
class JaxRSConsumesAnnotation extends JaxRSAnnotation {
281281
JaxRSConsumesAnnotation() { getType().hasQualifiedName("javax.ws.rs", "Consumes") }
282282
}

java/ql/src/semmle/code/java/security/XSS.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private class DefaultXssSink extends XssSink {
102102
|
103103
not exists(resourceMethod.getProducesAnnotation())
104104
or
105-
resourceMethod.getProducesAnnotation().getADeclaredMimeType() = "text/plain"
105+
resourceMethod.getProducesAnnotation().getADeclaredContentType() = "text/plain"
106106
)
107107
}
108108
}

0 commit comments

Comments
 (0)