瀏覽代碼

fix check multipart data

herlanS_ 3 年之前
父節點
當前提交
71039b918d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main/kotlin/co/id/datacomsolusindo/ipphonebridge/BridgeFIlter.kt

+ 1 - 1
src/main/kotlin/co/id/datacomsolusindo/ipphonebridge/BridgeFIlter.kt

@@ -81,7 +81,7 @@ class BridgeFilter(private val template: SimpMessagingTemplate, val resourceLoad
                     val rb = RequestBuilder(reqId, toPath, HttpMethod.valueOf(req.method), headerMap.toMutableMap())
 
                     rb.queryString = req.queryString
-                    if (req.contentType != null && req.contentType.toLowerCase().indexOf("multipart/form-data") > -1) {
+                    if (req.contentType != null && req.contentType.toLowerCase().contains("multipart/form-data")) {
                         rb.parts =
                             req.parts.map {
                                 val subFilename = if (it.submittedFileName == null) {