You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some CGI scripts (Gitweb and ikiwiki are the ones I'm tried) don't quite work with Ocsigen's cgimod. When they generate links, they seem to paste SERVER_NAME and REQUEST_URI together, but then you get links that look like http://www.server.comcgi-bin/path since REQUEST_URI is relative rather than absolute (at least in Ocsigen's cgimod)
Not sure whether it is OK with the standard, but the following patch solves the problem for me.
--- a/src/extensions/cgimod.ml
+++ b/src/extensions/cgimod.ml
@@ -271,7 +271,7 @@ let array_environment filename re doc_root ri hostname =
(* Neither in the CGI's spec nor in the HTTP headers but used, e.g., by PHP *)
Printf.sprintf "REMOTE_PORT=%d" (Ocsigen_request_info.remote_port ri);
- Printf.sprintf "REQUEST_URI=%s" (Ocsigen_request_info.url_string ri);
+ Printf.sprintf "REQUEST_URI=%s" (string_conform0 (Ocsigen_request_info.url_string ri));
(* FIXME: URI instead of URL ? *)
Printf.sprintf "SCRIPT_FILENAME=%s" filename ] ;
additionnal_headers
The text was updated successfully, but these errors were encountered:
Some CGI scripts (Gitweb and ikiwiki are the ones I'm tried) don't quite work with Ocsigen's cgimod. When they generate links, they seem to paste SERVER_NAME and REQUEST_URI together, but then you get links that look like
http://www.server.comcgi-bin/path
since REQUEST_URI is relative rather than absolute (at least in Ocsigen's cgimod)Not sure whether it is OK with the standard, but the following patch solves the problem for me.
The text was updated successfully, but these errors were encountered: