Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HTTP Status-Code: Control reason-phrase?

Charly_ZSep 18 2017 — edited Sep 18 2017

We use ords 3.0.3

We need to control the rate-limits for ords-rest-calls.

So we set the http-status code to 429 when a user hits the rate-limit and provide a retry-after in the response-header.

BTW: We use PL/SQL for our requests.

Works in general but the http-response looks like this (in standalone-mode):

HTTP/1.1 429 429

Content-Type: text/plain; charset=UTF-8

Retry-After: 300

Transfer-Encoding: chunked

....

We'd like to get the standard reason phrase for the 429-error which should be:

https://httpstatuses.com/429

429 - Too Many Requests

So the first line shoul look like:

HTTP/1.1 429 Too Many Requests

Is it possible to set the reason-phrase in ords?

Charly

PS:

When we run ords on the WLS-server with an Apache as proxy, we get:

HTTP/1.1 429 Unknown

Date: Mon, 18 Sep 2017 09:54:09 GMT

Server: Apache/2.4.18 (Red Hat) OpenSSL/1.0.1e-fips

Content-Type: text/plain; charset=utf-8

Retry-After: 300

X-ORACLE-DMS-ECID: e766768655fdb8e9:10c89626:15b629d2e57:-8000-000000000071b96d

X-Powered-By: Servlet/2.5 JSP/2.1

...

No idea who creates the "Unknown" reason-phrase here.

Apache, WLS, ORDS,....

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2017
Added on Sep 18 2017
1 comment
785 views