• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

some.cgi?data=a&data=b&data=c

Easy question...

What happens if one submits the same parameter with multiple values to a CGI?  For example:

http://domain.com/some.cgi?data=a&data=b&data=c&data=d

What happens in this case?  How would the CGI respond?
0
IgorStravinsky
Asked:
IgorStravinsky
  • 2
  • 2
  • 2
1 Solution
 
ozoCommented:
It is up to the CGI to decide.
0
 
chensuCommented:
It depends on how the CGI is implemented. Maybe only the last value is effective (data=d). Maybe only the first value is effective (data=a). Maybe the CGI checks if there are duplicate parameters and returns an error message. It really depends on the implementation details of the CGI.
0
 
chensuCommented:
Oops, I didn't see ozo's comment. Sorry.
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
IgorStravinskyAuthor Commented:
In the interests of fairness, I'll award the points to ozo.

Thanks!
0
 
ozoCommented:
Or maybe it takes all of them as a list of values for that parameter.
0
 
IgorStravinskyAuthor Commented:
Thanks.

I wasn't sure if there was some generally "accepted" way for this situation to be handled or if it was entirely up to the programmer of the CGI script.
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now