I did indeed try sanitising the path_info without knowing if it was bad. Lp will raise a 404. There is no indication that the request was not understood. I can think of 1 reason we really want 400, maybe you can cry YAGNI. If Lp is the referrer of a badly encoded request, we will see it in the oops reports with the oopses that most concern us. If the error is reported as a 404, the encoding problem is grouped with a large listing of moved or removed user data. If you don't want this separation, then I will simplify this branch.
I did indeed try sanitising the path_info without knowing if it was bad. Lp will raise a 404. There is no indication that the request was not understood. I can think of 1 reason we really want 400, maybe you can cry YAGNI. If Lp is the referrer of a badly encoded request, we will see it in the oops reports with the oopses that most concern us. If the error is reported as a 404, the encoding problem is grouped with a large listing of moved or removed user data. If you don't want this separation, then I will simplify this branch.