Skip to content

Commit

Permalink
LDEV-4898 stricter soap detection
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jul 25, 2024
1 parent 935eaff commit d3fe9db
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/src/main/java/lucee/runtime/ComponentPageImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import lucee.commons.lang.HTMLEntities;
import lucee.commons.lang.StringUtil;
import lucee.commons.lang.mimetype.MimeType;
import lucee.commons.net.HTTPUtil;
import lucee.runtime.component.StaticStruct;
import lucee.runtime.config.ConfigWebPro;
import lucee.runtime.converter.BinaryConverter;
Expand Down Expand Up @@ -87,6 +88,8 @@
import lucee.runtime.type.util.UDFUtil;
import lucee.runtime.util.PageContextUtil;



/**
* A Page that can produce Components
*/
Expand Down Expand Up @@ -691,6 +694,11 @@ private static void writeOut(PageContext pc, Object obj, MimeType mt, BinaryConv

public static boolean isSoap(PageContext pc) {
HttpServletRequest req = pc.getHttpServletRequest();

String strContentType = ReqRspUtil.getContentTypeAsString(pc, null);
Boolean isText = HTTPUtil.isTextMimeType(strContentType);
if (isText == null || !isText) return false;

InputStream is = null;
try {
is = req.getInputStream();
Expand Down

0 comments on commit d3fe9db

Please sign in to comment.