Kbase P11247: Missing part of the header of the returned HTML using output
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/09/2003 |
|
Status: Verified
FACT(s) (Environment):
WebSpeed
SYMPTOM(s):
Using output-http-header with wsisa.dll part of the beginning (header) of the returned HTML is not in the browser
Using output-http-header with cgiip error: "The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:"
PUT {&WebStream} output-http-header("", "HTTP/1.0 200 OK":U) /* RCF compiant */
CAUSE:
Although in the Webspeed documentation is written that output-http-header outputs a carriage return (CR) and linefeed (LF) at the end. In this case it is not doing so.
Example code that produces the problem:
&ANALYZE-RESUME
{src/web/method/wrap-cgi.i}
&Global WebStream Stream WebStream Unformatted
PUT {&WebStream} output-http-header("", "HTTP/1.0 200 OK":U) /* RCF compiant */
'<html>'
'<head>'
' <META HTTP-EQUIV="expires" CONTENT="0">' skip
' <META HTTP-EQUIV="Cache-Control" CONTENT="No-Cache">' skip
' <META HTTP-EQUIV="Pragma" CONTENT="No-Cache">' skip
' <title>Test WS</title>'
'</head>'
'<body>'
"Is this a WS Bug???"
'</body>'
'</html>'
.
FIX:
Add a skip after the output-http-header in order to have added a carriage return (CR) and linefeed (LF)
The Example code would be:
&ANALYZE-RESUME
{src/web/method/wrap-cgi.i}
&Global WebStream Stream WebStream Unformatted
PUT {&WebStream} output-http-header("", "HTTP/1.0 200 OK":U) Skip(2) /* RCF compiant */
'<html>'
'<head>'
' <META HTTP-EQUIV="expires" CONTENT="0">' skip
' <META HTTP-EQUIV="Cache-Control" CONTENT="No-Cache">' skip
' <META HTTP-EQUIV="Pragma" CONTENT="No-Cache">' skip
' <title>Test WS</title>'
'</head>'
'<body>'
"Is this a WS Bug???"
'</body>'
'</html>'
.