The following code appears to kill the HTTP task on R5, R6 & R7 servers:
HTTPKiller code
Sub Initialize
s = |Content-Type: text/xml <root>|
For i = 1 To 55
s = s + |<item>AAAAAAAAAA</item>|
Next
Print s + |</root>|
End Sub
and the below will not:
HTTPOK code
Sub Initialize
Print |Content-Type: text/xml|
Print |<root>|
For i = 1 To 55
s = s + |<item>AAAAAAAAAA</item>|
Next
Print s + |</root>|
End Sub
Calling the first agent from a browser with e.g. http://host/folder/HTTPKill.nsf/HTTPKiller?OpenAgent, will cause the HTTP task to terminate. It is then impossible to restart the HTTP service and the server has to be restarted.
This is reproducible on R5, R6 and R7 servers.
Calling the second agent from a browser with e.g. http://host/folder/HTTPKill.nsf/HTTPOK?OpenAgent, will not cause the HTTP task to terminate.
The difference
In the first agent ‘Content-Type: text/xml’ appears as part of the string variable ‘s’.
In the second agent the ‘Content-Type: text/xml’ appears in it’s own print statement before the ‘s’ variable is printed.
The above code is just a cut down version of the original agent I wrote, and is just to demonstrate the principle.
It appears as though the combination of adding the ‘Content-Type: text/xml’ statement to the start of a string variable and building a string of a certain length causes the HTTP task to terminate. I’ve tried it with smaller string lengths and while XML is not generated, it does not crash the HTTP service.
I realise that the ‘Content-Type: text/xml’ should always be the first statement printed but failure to do so should not result in a HTTP service crash, especially as it’s quite an easy mistake to make.
has anyone else encountered this?
has it been reported as a bug?