Wondering if anyone else seen this issue. In CF202...
# adobe
d
Wondering if anyone else seen this issue. In CF2023, IIS 10, if you POST a request with nothing in it (empty body), CF blows up with a 500. You can test by passing no form-data using POSTMAN. It seems to be a CF error, FusionReactor is reporting 500 Error javax.servlet.ServletException It doesn't pass through the error to IIS either, so can't debug what it's reporting, other than through Fusion Reactor. This isn't happening in CF2016.
Stack trace:
Copy code
"ajp-nio-0:0:0:0:0:0:0:1-8022-exec-20" Id=4729 WAITING on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@76b91a06 
   java.lang.Thread.State: WAITING
        at java.base@17.0.8/jdk.internal.misc.Unsafe.park(Native Method)
        - waiting on java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@76b91a06
        at java.base@17.0.8/java.util.concurrent.locks.LockSupport.park(LockSupport.java:341)
        at java.base@17.0.8/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block(AbstractQueuedSynchronizer.java:506)
        at java.base@17.0.8/java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:3465)
        at java.base@17.0.8/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3436)
        at java.base@17.0.8/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1623)
        at java.base@17.0.8/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:435)
        at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:141)
        at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:33)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1114)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1176)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.base@17.0.8/java.lang.Thread.run(Thread.java:833)
From Fusion reactor debug:
Copy code
org.apache.http.ParseException: Invalid content type: 

    at org.apache.http.entity.ContentType.parse(ContentType.java:321)

    at coldfusion.filter.FormScope.fillForm(FormScope.java:334)

    at coldfusion.filter.FusionContext.SymTab_initForRequest(FusionContext.java:546)

    at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:33)

    at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)

    at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)

    at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:154)

    at coldfusion.CfmServlet.service(CfmServlet.java:231)

    at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)

    at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46)

    at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)

    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)

    at jdk.internal.reflect.GeneratedMethodAccessor140.invoke(Unknown Source)

    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.base/java.lang.reflect.Method.invoke(Method.java:568)

    at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:134)

    at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:698)

    at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:256)

    at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:119)

    at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:736)

    at com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36)

    at jdk.internal.reflect.GeneratedMethodAccessor145.invoke(Unknown Source)

    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.base/java.lang.reflect.Method.invoke(Method.java:568)

    at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:71)

    at jdk.internal.reflect.GeneratedMethodAccessor144.invoke(Unknown Source)

    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.base/java.lang.reflect.Method.invoke(Method.java:568)

    at com.intergral.fusionreactor.agent.filter.FusionReactorStaticFilter.doFilter(FusionReactorStaticFilter.java:54)

    at com.intergral.fusionreactor.agent.pointcuts.NewFilterChainPointCut$1.invoke(NewFilterChainPointCut.java:50)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)

    at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:446)

    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)

    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)

    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)

    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)

    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)

    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)

    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

    at java.base/java.lang.Thread.run(Thread.java:833)
m
Have you reported this to cfsup@adobe.com yet or put in a tracker ticket?
I'm surprised actually that CF2016 doesn't throw an exception.
d
It's a major for us right now, we have API requests which POST to an endpoint with no data. All blowing up.
@Mark Takata (Adobe) I've emailed cfsup, hoping for a quick fix as it's all exploding right now.
m
@priyank_adobe @sandip_halder
❤️ 1
b
@davequested I don't know if this observation will be helpful, but this error line caught my eye
org.apache.http.ParseException: Invalid content type:
(that looked like blank data to me) Are you able to see the raw requests that are / are not triggering this error? I was able to reproduce this in CF2023 with a POST request that had no POST data and had a blank
Content-Type:
header, e.g.:
Copy code
POST /some-acf-endpoint/ HTTP/1.1
Host: localhost
Content-Type: 
Connection: close
Content-Length: 6
A request like the one above without a
Content-Type:
header work fine. (And the original request works fine on some older ACF versions) I don't know if you can control what the request headers look like (e.g., if you are generating them, or you can control them via JS), but that removing the
Content-Type:
header for requests that don't have POST data may be a quick fix/workaround. (I don't know what the RFCs say, but
Content-Type:
is only recommended/required for POST/PUT/etc. requests that have data in the request body
👍 1
d
@Brian Reilly So we came about this error because we have an API POST endpoint that has no form data being passed. If you use POSTMAN and don't pass any form data, it goes bang. It's Apache Tomcat that is throwing the error from what I can tell. Seems like a major issue to me, what stops anyone POSTing to any coldfusion server with no form data. Will create endless 500s and can't be caught at CF level as it never reaches it to try/catch etc.
b
I'm not all that familiar with Postman, but it probably shouldn't be sending an empty
Content-Type:
request header in a POST that doesn't have any data in the body. I don't know if there's a way to change how Postman is working - or if that's a limitation or a bug in Postman
This type of POST, with no
Content-Type:
header, should work fine against CF2023-
Copy code
POST /some-acf-endpoint/ HTTP/1.1
Host: localhost
Connection: close
Content-Length: 6
d
@Brian Reilly doesn't really relate to POSTMAN, just an easy way to replicate. Our angular app using http.post without form data has the same issue. CF2023 shouldn't error if no form-data supplied.
As you highlight, this is a breaking change from previous versions of CF.
m
Dave can you confirm a few things? 1. You're on the latest update for CF23 2. You moved from CF2016 directly to CF23 3. You didn't test this on 18 or 21 (number 2 above kind of answers this but I need to ask) It is possible this has been an issue for a long time, and is possibly a long standing change made by Apache Tomcat but I'm investigating internally.
d
@Mark Takata (Adobe) 1, Yep latest CF2023 with update 5. Java 17.0.8 2. Yep 2016 to 2023. 3. No, haven't tested this on those versions. Don't have them available locally to try. Could have been issue on 18, 21. Presumably your team have reproduced the error and could test on older verrsions?
m
Glad we got that sorted. I'll pass your msg on up to leadership. ❤️ 🙂