Calling URLs with CGI and path info does not work #36

Closed
opened 2023-03-16 17:25:33 +00:00 by alexlehm · 2 comments

When calling a CGI url with path info, the request is never evaluated by the handleCGI method

a url like gemini://hostname/cgi-bin/script.cgi/path should run script.cgi and put /path into the PATH_INFO variable, however since the validity of the path is checked before the CGI handler is called, it notices that the path does not exist and gives an error response.

This happens in handler.go around line 137, when I comment out the whole block, the CGI runs, however then it is missing some of the directory checks and the checking if the path contains symlinks

When calling a CGI url with path info, the request is never evaluated by the handleCGI method a url like gemini://hostname/cgi-bin/script.cgi/path should run script.cgi and put /path into the PATH_INFO variable, however since the validity of the path is checked before the CGI handler is called, it notices that the path does not exist and gives an error response. This happens in handler.go around line 137, when I comment out the whole block, the CGI runs, however then it is missing some of the directory checks and the checking if the path contains symlinks
Owner

Thanks for the report! This should be fixed now. Sorry about this, I semi-recently rearranged the order of the various components of handleGeminiRequest() in what I thought was a more logical order but obviously broke this.

Thanks for the report! This should be fixed now. Sorry about this, I semi-recently rearranged the order of the various components of `handleGeminiRequest()` in what I thought was a more logical order but obviously broke this.
Author

thank you

thank you
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: solderpunk/molly-brown#36
No description provided.