Vs
Size: a a a
В
AN
JK
AN
JK
AN
6.2.1. Document Response
The CGI script can return a document to the user in a document
response, with an optional error code indicating the success status
of the response.
document-response = Content-Type [ Status ] *other-field NL
response-body
В
AN
В
AN
# ./script.cgi
Content-type: text/plain; charset=Windows-1251
Expires: Mon, 04 Jul 2003 05:00:00 GMT
X-Accel-Expires: 0
Cache-Control: no-cache, must-revalidate;
<result status="error">login or password is empty</result>
# ./wrapper.cgi
Content-type: application/json
Expires: Mon, 04 Jul 2003 05:00:00 GMT
X-Accel-Expires: 0
Cache-Control: no-cache, must-revalidate;
<result status="error">login or password is empty</result>
# cat wrapper.cgi
#!/bin/bash
echo Content-type: application/json
./script.cgi | grep -v ^Content-type
#