Fix bad request handling
This commit is contained in:
parent
dc52c20098
commit
e3e84a0441
|
@ -132,8 +132,10 @@ on_stream_request(AxFeedback mod, const struct aisl_evt *evt)
|
||||||
AislStream s = (AislStream)evt->source;
|
AislStream s = (AislStream)evt->source;
|
||||||
|
|
||||||
/* verify input */
|
/* verify input */
|
||||||
if (!ctx->email || !ctx->msg || ax_validate_email(ctx->email) != 0)
|
if (!ctx->email || !ctx->msg || ax_validate_email(ctx->email) != 0) {
|
||||||
ax_quick_response(s, AISL_HTTP_BAD_REQUEST);
|
ax_quick_response(s, AISL_HTTP_BAD_REQUEST);
|
||||||
|
goto finally;
|
||||||
|
}
|
||||||
|
|
||||||
ctx->mail.reply_to = ctx->email;
|
ctx->mail.reply_to = ctx->email;
|
||||||
ctx->mail.msg = ctx->msg;
|
ctx->mail.msg = ctx->msg;
|
||||||
|
@ -144,6 +146,7 @@ on_stream_request(AxFeedback mod, const struct aisl_evt *evt)
|
||||||
|
|
||||||
aisl_set_output_event(s, true); /**< enable output event */
|
aisl_set_output_event(s, true); /**< enable output event */
|
||||||
|
|
||||||
|
finally:
|
||||||
return AISL_SUCCESS;
|
return AISL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue