Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using CGI exe with IW
#21
So, a little RFC just for fun:

The Common Gateway Interface (CGI) Version 1.1: https://tools.ietf.org/html/rfc3875

There we read:

Quote:7.2.  UNIX

  The current working directory
      The current working directory for the script SHOULD be set to the
      directory containing the script.


Remember that there is no CGI spec for Windows. So I'm using UNIX as the base. Others are just the same.

So, we need to find out what SHOULD means in that RFC. If we go back a little, in the same RFC we read:


Quote:1.2.  Requirements

  The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT',
  'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY' and 'OPTIONAL' in this
  document are to be interpreted as described in BCP 14, RFC 2119 [3].


This is basically the same for all RFCs. Then we go to BCP 14 to find out what SHOULD means:

https://tools.ietf.org/html/bcp14

From there I quote:


Quote:1. MUST  This word, or the terms "REQUIRED" or "SHALL", mean that the
  definition is an absolute requirement of the specification.

....

3. SHOULD  This word, or the adjective "RECOMMENDED", mean that there
  may exist valid reasons in particular circumstances to ignore a
  particular item, but the full implications must be understood and
  carefully weighed before choosing a different course.


As you can see, SHOULD means RECOMMENDED. It is not an obligation to fulfill the requirements. I've also included item 1 (MUST) to show that the spec would definitely use MUST, and not SHOULD, if that was a requirement of the spec. MUST is only used when it is a requirement. 

On the other hand, knowing that there is no obligation to set the current directory when calling a CGI script, the CGI script developer MUST make sure that the current directory is set if the task performed by the script is sensitive to current directory setting. Whoever does it differently is lazy.    Rolleyes
Reply


Messages In This Thread
Using CGI exe with IW - by cprmlao@hotmail.com - 09-08-2019, 09:06 PM
RE: Using CGI exe with IW - by Alexandre Machado - 09-09-2019, 08:57 AM
RE: Using CGI exe with IW - by Alexandre Machado - 09-10-2019, 09:27 AM
RE: Using CGI exe with IW - by Alexandre Machado - 09-10-2019, 08:55 PM
RE: Using CGI exe with IW - by Alexandre Machado - 09-10-2019, 09:03 PM
RE: Using CGI exe with IW - by Alexandre Machado - 09-12-2019, 08:34 AM
RE: Using CGI exe with IW - by Alexandre Machado - 10-08-2019, 08:32 AM
RE: Using CGI exe with IW - by Alexandre Machado - 10-08-2019, 08:38 AM
RE: Using CGI exe with IW - by Alexandre Machado - 10-08-2019, 08:24 PM
RE: Using CGI exe with IW - by kudzu - 10-08-2019, 09:51 PM
RE: Using CGI exe with IW - by Alexandre Machado - 10-09-2019, 07:46 AM
RE: Using CGI exe with IW - by Alexandre Machado - 10-09-2019, 08:01 AM
RE: Using CGI exe with IW - by Alexandre Machado - 10-09-2019, 08:08 PM
RE: Using CGI exe with IW - by kudzu - 10-09-2019, 08:14 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)