url_response: HTTP_STATUS_BAD_REQUEST 400

book

Article ID: 222622

calendar_today

Updated On:

Products

CA Unified Infrastructure Management On-Premise (Nimsoft / UIM)

Issue/Introduction

Some urls failing with HTTP_STATUS_BAD_REQUEST 400

Cause

When entering those URLs into a browser, they redirect.

Environment

Release : Any UIM release

Component : UIM - URL_RESPONSE

Resolution

Some websites use HTML or JavaScript to trigger redirects, and these do not work with the url_response probe. If the url_response probe gets a redirect code as part of the HTTP response, it will automatically follow the redirect properly. If the redirect is embedded in a the response content, the url_response probe knows nothing about it.

In a browser, it is hard to tell how redirects are triggered. The best way to test problem URLs is the wget command. (curl command would be very effective as well.) wget command can be found in the repositories for nearly any Linux distribution, and can get a Windows version here:

http://gnuwin32.sourceforge.net/packages/wget.htm
 
wget command by default shows every step of the web transaction, calling out all of the redirects and such. It has made some cause of URL monitoring issues nice and obvious even though make understand what was broken when just checked with a browser.