HTTP Request seems to always be GET

I’m building a new API server using Lucee, and I just noticed that all of
my requests are coming in as GET. I’m using Postman for testing, and when
I do a POST the result via both CGI.request_method and
getHttpRequestData().method are both displaying GET.

I’m running Apache2 on Ubuntu.

Anyone else run into this?

Jason

One cause that springs to mind that would produce this behaviour is some
kind of redirect (rather than rewrite) rules going on. If there are URL
redirects going on somewhere in the stack, the redirected URL will always
be a GET. e.g. if you had a redirect rule in apache to change URLs not
ending in a slash to ending in a slash, you’d get this:

POST /some/url → Apache response: redirect to /some/url/
GET /some/url/ → Lucee receives this when expecting POST

Check the network tab in your browser, you’ll be able to see this behaviour
if that is the case.

(I’ve not seen this behaviour in any other scenario personally).On 27 January 2017 at 14:26, Jason Graves <@Jason_Graves> wrote:

I’m building a new API server using Lucee, and I just noticed that all of
my requests are coming in as GET. I’m using Postman for testing, and when
I do a POST the result via both CGI.request_method and
getHttpRequestData().method are both displaying GET.

I’m running Apache2 on Ubuntu.

Anyone else run into this?

Jason


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/lucee/9398a45f-0550-42ea-a4a0-4c8f32a24222%40googlegroups.com
https://groups.google.com/d/msgid/lucee/9398a45f-0550-42ea-a4a0-4c8f32a24222%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Dominic Watson
Technical Lead

Pixl8 Interactive, 3 Tun Yard,
Peardon Street, London, SW8 3HT
+44 (0) 207 720 4545 <020%207720%204545>

http://www.facebook.com/pixl8 http://www.twitter.com/pixl8
http://www.linkedin.com/company/pixl8-interactive