I am sending a PATCH request into a legacy fusebox...
# cfml-general
b
I am sending a PATCH request into a legacy fusebox app (running on lucee/commandbox) behind an IIS proxy but it is being converted to GET somewhere, somehow. Any ideas what could be causing something like that?
More details... • POSTs work fine • cfm and cfc handler mapping settings in IIS both allow all verbs (and if it didnt, it would error, not change it to a GET) • There are no rewrite rules that would change it • The browser shows the request-method as PATCH • The browser shows the the Access-Control-Allow-Methods response header as "OPTIONS, HEAD, GET, POST, PATCH" • IIS logs claim the request was a PATCH • There is no redirect happening Yet, as early as in onRequestStart(), getHttpRequestData().method and cgi.request_method are both "GET"
s
Some proxies don't support PUT, PATCH, or DELETE and convert them to GET or POST. What sort of connector do you have between IIS and CommandBox/Lucee, and what versions of everything are you running?
In particular, AJP 1.3 does not support PATCH, so it might be related to that.
b
Doh… Definitely using AJP. I’ll have to check the version later but I’d have to guess that’s it.
b
Yep, I've seen people with BonCode have their patch requests converted to get
👍 1
There is a ticket on the BonCode Github issue tracker with more details if I recall
s
We switched from AJP proxy to plain HTTP proxy to get around that -- and we stayed with HTTP proxy in production ever since. AJP is a mess, IMO.
👍🏼 1
👍 1
(and now we're using Nginx so that's plain HTTP proxy as well)
👍 1
b
AJP is the only thing I’ve ever used with IIS reverse proxy. I’ll see what I can find out about “plain HTTP proxy”. Thanks for the heads up on ajp
b
Are you using the mod_cfml stuff at all? It not, it should work pretty well.
b
Nope. Not using mod_cfml
👍 1
Everything I find seems to suggest using the Boncode AJP connector (my site is actually the first google result even heh). Do you have any suggested reads for doing it without it?
b
@bhartsfield It's been a while since I set up an HTTP proxy, but it was just using the request routing feature you add into IIS to configure a basic proxy
Note, if you are doing it on development pointing to a server with no license key activated, I've had the proxy trip Adobe's feature router that only allows two IPs on a developer license and start blocking requests.
But basically, just google any guide for setting up a basic reverse proxy in IIS and you can test that. you'd point it to the HTTP port for CommandBox. The last time I played with it, i recall having an issue getting virtual directories to work, but I don't recall what the issue was -- just something to ensure you test.
I'd also recommend poking Bilal on that Github ticket to see if he can find a workaround for PATCH over AJP