Skip to content

Commit

Permalink
Merge pull request #74 from WimJongeneel/master
Browse files Browse the repository at this point in the history
Add null check around user agent
  • Loading branch information
wrdsnd authored Feb 7, 2024
2 parents dce9f57 + 92de4f9 commit 52569f1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ protected void processRequest(IMxRuntimeRequest request, IMxRuntimeResponse resp
* a 200 OK tells word the end of the redirect is reached, and it will happily open the
* original URL in your default browser...
*/
if (request.getHeader("User-Agent").toLowerCase().contains("office")) {
String userAgent = request.getHeader("User-Agent");
if (userAgent != null && userAgent.toLowerCase().contains("office")) {
response.setStatus(IMxRuntimeResponse.OK);
return;
}
Expand Down

0 comments on commit 52569f1

Please sign in to comment.