Re: CGI and euc
- Posted by CoJaBo2 Jan 14, 2013
- 2300 views
So what's the issue with "HTTP/1.0 200 OK\r\n"?
The issue with it is that that line is an HTTP header, while your program needs to be outputting CGI headers. It should be "Status: 200 OK\r\n" instead.
(Yes, it looks like, back in the nineties, NCSA, CERN, and Apache 1.0 had a feature to send raw HTTP headers over CGI; Apache 2.2, however, no longer supports this- you have to use the CGI syntax)
I wasn't discussing browsers, i was discussing a Eu CGI app sending urls in plain un-escaped text to anything. My Eu code can read plain text in webpages and decide to follow or not, escape or not, and my choices of browsers behave well also. I am not changing anything to suit you.
This thread is not about your app; it is about bugmagnet's app, which outputs HTML. In HTML, browser or no browser, links have to be escaped.
It should default to NOT following a redirect. A server responce should be returned to the programmer for due consideration.
The server response is often empty; in cases it is not, it is a fallback for HTTP/0.9 browsers, which don't support redirects. It makes sense that Eu should default to following them, as thats whats going to be needed in 95% of cases. The remaining times would be exceptions- apps that prompt the user to confirm following a redirect, apps that debug HTTP/status information (for the latter case, Eu really ought to support HEAD as well..).