Update to allow _qStepTimeoutMillis to come from formBody

This commit is contained in:
2023-01-25 10:09:45 -06:00
parent efa796bb39
commit c972f9cecc
2 changed files with 23 additions and 1 deletions

View File

@ -1295,6 +1295,24 @@ public class QJavalinImplementation
/*******************************************************************************
** Returns Integer if context has a valid int form parameter by the given name,
** Returns null if no param (or empty value).
** Throws QValueException for malformed numbers.
*******************************************************************************/
public static Integer integerFormParam(Context context, String name) throws QValueException
{
String value = context.formParam(name);
if(StringUtils.hasContent(value))
{
return (ValueUtils.getValueAsInteger(value));
}
return (null);
}
/*******************************************************************************
** Returns String if context has a valid query parameter by the given name,
* Returns null if no param (or empty value).

View File

@ -737,7 +737,11 @@ public class QJavalinProcessHandler
Integer timeout = QJavalinImplementation.integerQueryParam(context, "_qStepTimeoutMillis");
if(timeout == null)
{
timeout = ASYNC_STEP_TIMEOUT_MILLIS;
timeout = QJavalinImplementation.integerFormParam(context, "_qStepTimeoutMillis");
if(timeout == null)
{
timeout = ASYNC_STEP_TIMEOUT_MILLIS;
}
}
return timeout;
}