in reply to Re^5: json return value
in thread json return value
Yes...it gives me this..
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@myurl.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
However if I have a small cgi like the following, it works fine when accessed through the browser
#!/usr/bin/perl print "Content-type:text/html\r\n\r\n"; print '<html>'; print '<head>'; print '<title>Hello Word</title>'; print '</head>'; print '<body>'; print '<h2>Hello World</h2>'; print '</body>'; print '</html>';
I've been in contact with the server administrator and he sent me the log file results.
Mon Jul 15 14:49:20 2013 error client 87.194.165.154 Premature end of script headers: json_mode.cgi
He also suggested that I add the following to the code, but that is already in the code He also told me that it was because the script wasn't outputting valid html headers.
print("Content-type: text/json"); or print("Content-type:application/json");
The client is working fine because I can get the correct response from http://buzzword.org.uk/2013/json-addition.cgi'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: json return value
by poj (Abbot) on Jul 16, 2013 at 07:27 UTC | |
by stenasc (Novice) on Jul 16, 2013 at 07:50 UTC | |
by Corion (Patriarch) on Jul 16, 2013 at 07:53 UTC | |
by poj (Abbot) on Jul 16, 2013 at 08:31 UTC | |
by stenasc (Novice) on Jul 16, 2013 at 12:40 UTC | |
by Anonymous Monk on Jul 16, 2013 at 14:13 UTC | |
| |
by stenasc (Novice) on Jul 16, 2013 at 14:01 UTC | |
by poj (Abbot) on Jul 16, 2013 at 14:12 UTC | |
| |
|
Re^7: json return value
by Anonymous Monk on Jul 16, 2013 at 08:23 UTC |