[SOLVED] Error due to double header in SOAP/XML monitor

When you post information about some problem, please include the following details: - OS version (e.g. Windows 2000 Professional SP3); HostMonitor version; problem description.
Post Reply
JBee
Posts: 10
Joined: Mon Sep 28, 2009 1:34 am
Location: The Netherlands

[SOLVED] Error due to double header in SOAP/XML monitor

Post by JBee »

Hi Alex,

I have the following problem with Hostmonitor version 9.02 Beta on Windows XP SP3.

After creating a SOAP/XML monitor and using Fiddler (HTTP Debugging Proxy) I found out that Hostmonitor sends two headers
and returns an HTTP/1.1 Internal Server Error.

Content-Type: text/xml; charset=utf-8
Content-Type: application/x-www-form-urlencoded


The monitor is a POST request with SOAP version 1.1 and I created a header for the SOAPAction.

Could you take a look and see if you can reproduce this problem ?

Best regards,
Jeroen

FYI : The test method is called SAOP/XML instead of SOAP/XML.
Last edited by JBee on Mon Apr 23, 2012 6:14 am, edited 2 times in total.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Content-Type: text/xml; charset=utf-8
Content-Type: application/x-www-form-urlencoded
HostMonitor inserts "Content-Type: text/xml; charset=utf-8" into HTTP header when you are using POST method and SOAP version 1.1
HostMonitor does not insert "Content-Type: application/x-www-form-urlencoded" into header.
We just rechcked code and performed some tests, it works properly.

BTW: What version of Internet Explorer is installed on your system?

Regards
Alex
JBee
Posts: 10
Joined: Mon Sep 28, 2009 1:34 am
Location: The Netherlands

Post by JBee »

Ok, thanks for checking. Do you have any ideas where the second header is coming from ?

I have installed IE8 (and FF 3.6.22) on my system.

I also tested the same monitor (also in application mode but without proxy) on a system with Windows Server 2003 SP2 with IE7 and it returns the same error.

Below the message that is returned when I use the "Test" button.

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml
X-Backside-Transport: FAIL FAIL
Connection: close
Set-Cookie: sticky-key=3460502955.20736.0000; expires=Thu, 24-Nov-2011 15:29:30 GMT; path=/
Vary: Accept-Encoding

What is causing the FAIL FAIL message ?

BTW: A great idea to implement this type of test. At the moment we use Shell Script tests with a powershell script to check the status of our SOAP services but this puts a heavy burding on CPU & Memory resources.

Regards,
Jeroen
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Is your server accessible from internet?
Could you export test settings into text file and send it to us?

Regards
Alex
JBee
Posts: 10
Joined: Mon Sep 28, 2009 1:34 am
Location: The Netherlands

Post by JBee »

No, server isn't accessible from internet.
I will mail you the test settings.

Regards,
Jeroen
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

We tested HostMonitor with IE8 as well, works fine.
Can you setup HostMonitor to perform URL requests without using proxy? Select "direct to net" option on "Connection/Access method" page in the Options dialog.
HTTP/1.1 500 Internal Server Error
Content-Type: text/xml
X-Backside-Transport: FAIL FAIL
I think its good idea to ask your web server administrator about this problem. He knows what exactly web server is used, what script processes this SOAP request, what parameters are required by this script, he can check web server log files and so on...

May be your server supports SOAP version 1.2 as well?

Regards
Alex
JBee
Posts: 10
Joined: Mon Sep 28, 2009 1:34 am
Location: The Netherlands

Post by JBee »

Standard setting is "direct to net", I only use a proxy for debugging purposes.

We don't support SOAP 1.2 at the moment.

The check works fine if I change the check to a GET (WSDL) instead of a POST.

Could you please have another look at this problem ?

We want to upgrade from HM 8.28 but only if we can use the SOAP checks.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

We re-tested HostMonitor version 9.02 and 9.16 (not available for download yet) with IE 8.0, everything looks fine, only one "Content-Type:" listed in HTTP request.
The check works fine if I change the check to a GET (WSDL) instead of a POST.
May be your server accepts only GET requests?
If GET request works fine, why do you want to use POST request?

Regards
Alex
JBee
Posts: 10
Joined: Mon Sep 28, 2009 1:34 am
Location: The Netherlands

Post by JBee »

We re-tested HostMonitor version 9.02 and 9.16 (not available for download yet) with IE 8.0, everything looks fine, only one "Content-Type:" listed in HTTP request.
I check my (HTTP) request headers with the free web debugger proxy Fiddler (http://www.fiddler2.com). How do you check yours ?
May be your server accepts only GET requests?
No, the server accepts both request and this problem occurs with different servers/applications.
If GET request works fine, why do you want to use POST request?
Only to test if a valid connection can be made to the server/application. We need to use POST requests.

Below is the check I tried yesterday, the (raw) request/response are from Fiddler. I changed the domain name in both request and response.

Request:
POST https://www.xxxxx.com/em/lse/sysint/sysint.asmx HTTP/1.1
SOAPAction: http://www.teledyne.com/lse/SysInt/IsServiceAlive
Content-Type: text/xml; charset=utf-8
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0)
Host: www.xxxxx.com
Content-Length: 232
Connection: Keep-Alive
Cache-Control: no-cache
Pragma: no-cache

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sys="https://www.xxxxx.com/em/lse/SysInt"><s ... rviceAlive xmlns="https://www.xxxxx.com/em/lse/SysInt"/>< ... p:Envelope>

Response:
HTTP/1.1 400 Bad Request
Connection: Keep-Alive
Set-Cookie: ISAWPLB{4E7ED4A1-64DD-4FEF-AFE3-9286B76B8B92}={09A452C1-4646-4261-AC04-8227B9AB3584}; HttpOnly; Path=/
Content-Length: 42
Date: Thu, 05 Apr 2012 05:37:41 GMT
Content-Type: text/html
Set-Cookie: sticky-key=411309483.47873.0000; expires=Thu, 05-Apr-2012 13:37:41 GMT; path=/
Set-Cookie: xxx_tracking_id=57024251_172.26.166.48;path=/;domain=.xxxxx.com;

<h1>Bad Request (Invalid Header Name)</h1>

Because of the double request header, do you agree with me that the problem must be on the sending end (my workstation) and not on the receiving end (server/application/firewall/etc) ?

Regards,
Jeroen
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

I check my (HTTP) request headers with the free web debugger proxy Fiddler (http://www.fiddler2.com). How do you check yours ?
We used Wireshark Network Protocol Analyzer (www.wireshark.org), also, we checked traffic, using Fiddler.
Both analyzers show that HostMonitor sends only one Content-Type header.
Because of the double request header, do you agree with me that the problem must be on the sending end (my workstation) and not on the receiving end (server/application/firewall/etc) ?
Do you use Fiddler installed on local system, where HostMonitor runs ?
Problem should be between HostMonitor and Fiddler.
Question is what 3-rd party application modifies HTTP headers, sent by HostMonitor.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Also, could you export test settings into text file and send to us + hostmon.ini file (support@ks-soft.net)?

Regards
Alex
JBee
Posts: 10
Joined: Mon Sep 28, 2009 1:34 am
Location: The Netherlands

Post by JBee »

Do you use Fiddler installed on local system, where HostMonitor runs ?
Fiddler and Hostmonitor (9.16) are both installed on my workstation. Today I also installed Hostmonitor (9.16) on a server (windows server 2003 SP2 with IE7) and used the same test and got the same response (HTTP/1.1 400 Bad Request).
Problem should be between HostMonitor and Fiddler.
Not necessarily, how do you explain that I get the same response if Fiddler isn't used (direct connection) or installed (server).
Question is what 3-rd party application modifies HTTP headers, sent by HostMonitor.
I'm not yet convinced that it is the 3rd party application.

Regards,
Jeroen
JBee
Posts: 10
Joined: Mon Sep 28, 2009 1:34 am
Location: The Netherlands

Post by JBee »

I have been able to solve this problem with a fix provided by the support team.

The problem was related to the HTTPS protocol.

The fix will be included in the next release of Hostmonitor.

My compliments !!!

Regards,
Jeroen
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Sorry for delay :-(
If we knew its related to HTTPS protocol we could fix it much sooner but we spent most of time checking HTTP module...

Regards
Alex
Post Reply