New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing JSON object as search term for /v2/broadcasts/list/{offset}/{size} in cluster mode fails #5336
Comments
Hi @timantmedia , It's not related to Ant Media Server directly. The problem is there is a character limit in mongo db. Please talk with the customer about the ConnectorComponentId value. It should be shorter. Whenever I shortened it, the error is solved. |
Hi @mustafaboleken, |
I investigate more about this issue and found that the list item and string with minus character interpreted as range character like |
Hi @mustafaboleken, Don't we have an option to let the mongodb search as a free text search or escape this characters in searching? |
Hi @mekya |
Let's use the search function, we're not sure that 100% of the users use for text search only. We don't need to have %100 coverage for this issue. This function is for text search and please don't be perfectionist to solve this issue. It's blocking you. Just fix it and have the test code for this bug. If one day some user asks for regular expression support, we can think of adding regular expression support. |
@timantmedia it's merged, fyi |
Short description
A Customer is using a JSON object as the name for a live stream on creation.
When making an API request to /v2/broadcasts/list/{offset}/{size} and passing a JSON object as the search term, it works on a standalone instance but fails if in cluster mode.
Error log shows:
java.lang.IllegalArgumentException: Invalid character found in the request target [/LiveApp/rest/v2/broadcasts/list/0/100?search={%22tenantId%22:%22fd216128-e4da-11ed-9c89-bfe723cdc436%22,%22erCollectionId%22:%225fb69a0a-26d7-4ce7-81c5-ac7ab4949a27%22,%22ConnectorComponentId%22:%22[6b8d7491-a86a-4c64-a982-0f8a2d3d393b.9c9df16c-eac1-4593-8010-d28e92f8a694]%22} ]. The valid characters are defined in RFC 7230 and RFC 3986
The customer reported the following information from the log file:
Environment
Steps to reproduce
Expected behavior
The API request should return a valid result in both cluster mode and standalone mode.
Actual behavior
Only standalone mode returns the result.
Logs
Place logs on pastebin or elsewhere and put links here
Ask your questions on Ant Media Github Discussions
The text was updated successfully, but these errors were encountered: